Results 1 to 2 of 2

Thread: Position of a Window

  1. #1

    Thread Starter
    Frenzied Member nishantp's Avatar
    Join Date
    Jan 2001
    Location
    Where you least expect me to be
    Posts
    1,375

    Position of a Window

    Hello, I'd like to know what APIs I need (and how to use them) to get the position of a window based on its Title or Hwnd. Thanks.
    You just proved that sig advertisements work.

  2. #2
    Hyperactive Member Vishalgiri's Avatar
    Join Date
    Oct 2003
    Location
    India
    Posts
    345
    VB Code:
    1. Declare Function GetWindowRect Lib "user32" Alias "GetWindowRect" (ByVal hwnd As Long, lpRect As RECT) As Long

    Here

    -> hWnd
    Identifies the window.

    -> lpRect
    Points to a RECT structure that receives the screen coordinates of the upper-left and lower-right corners of the window.


    also structure of rect

    VB Code:
    1. Private Type RECT
    2.     Left As Long
    3.     Top As Long
    4.     Right As Long
    5.     Bottom As Long
    6. End Type
    Regards,
    Vishalgiri Goswami
    Gujarat, ( INDIA ).
    ---------------------

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