I have the window handle, but whenever I try with the RECT structure and GetWindowRect() it returns 0's, with a valid HWND.
Any other ideas? :)
Printable View
I have the window handle, but whenever I try with the RECT structure and GetWindowRect() it returns 0's, with a valid HWND.
Any other ideas? :)
Well, if you want it measured in twips, you could use the form's Left and Top values.
VB Code:
Dim xcoord As Long Dim ycoord As Long xcoord = Form1.Left ycoord = Form1.Top
However, you should know that an xcoord value of 0 will be the extreme left hand side of the screen, and a ycoord value of 0 will be the extreme bottom of the screen, based on where the title bar touches. If you want it measured in geometric X, Y format (where xcoord 0, ycoord 0 will be the exact center of the screen) I cannot help you.
not of my form, of another program
like i get the handle of the program (done), just need the above info