Results 1 to 2 of 2

Thread: GETTING HANDLE INFORMATION OF A WINDOW YOUR MOUSE IS CURRENTLY ON?

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jun 1999
    Posts
    25

    Post

    Ok, I would like to know how i could make a program that could retrieve the following information of the window: handle, its caption, class, any other, etc... anyway...
    i'm thinking that i will need to use the Declaration:

    Public Declare Function GetHandleInformation Lib "kernel32" Alias "GetHandleInformation" (ByVal hObject As Long, lpdwFlags As Long) As Long

    There might be other declerations to retrieve this information, but its not much about the decleratations, but how do i use the decleration? By using the declaration mentioned above, how do i write a function or a sub that could hold the information i want in separate variables? Please helpppp!!!!! I'm an idiot. Dope.

  2. #2
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844

    Post

    Use these APIs:

    Public Declare Function WindowFromPoint Lib "user32" Alias "WindowFromPoint" (ByVal xPoint As Long, ByVal yPoint As Long) As Long

    Public Declare Function GetCursorPos Lib "user32" Alias "GetCursorPos" (lpPoint As POINTAPI) As Long

    Get the X/Y value of the mouse, then use WindowFromPoint to get the handle

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