I wrote up a client window selection example for VB.NET, it uses a crosshair to let you select a window and calculates your mouse coordinates relative to the selected window. You can download the source here: http://ibeblog.com/files/WndSelExampleVB.rar