PDA

Click to See Complete Forum and Search --> : GETTING HANDLE INFORMATION OF A WINDOW YOUR MOUSE IS CURRENTLY ON?


Idiot2VB
Jan 19th, 2000, 11:23 AM
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.

Clunietp
Jan 19th, 2000, 11:35 AM
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