Results 1 to 3 of 3

Thread: get x,y coords and height, width of a window

  1. #1

    Thread Starter
    Fanatic Member nabeels786's Avatar
    Join Date
    Jul 2001
    Location
    New York
    Posts
    919

    get x,y coords and height, width of a window

    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?
    Visit www.fragblast.com
    Gaming, forums, and a online RPG/Battle system




    (__Flagg) DOT NET? is this a Hindi Dating service?

  2. #2
    Fanatic Member hothead's Avatar
    Join Date
    Mar 2002
    Location
    Missouri
    Posts
    692
    Well, if you want it measured in twips, you could use the form's Left and Top values.

    VB Code:
    1. Dim xcoord As Long
    2. Dim ycoord As Long
    3.  
    4. xcoord = Form1.Left
    5. 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.

  3. #3

    Thread Starter
    Fanatic Member nabeels786's Avatar
    Join Date
    Jul 2001
    Location
    New York
    Posts
    919
    not of my form, of another program

    like i get the handle of the program (done), just need the above info
    Visit www.fragblast.com
    Gaming, forums, and a online RPG/Battle system




    (__Flagg) DOT NET? is this a Hindi Dating service?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width