WindowFromPoint (user32)
Last changed: -98.115.156.13

.
Summary

C# Signature:

[DllImport("user32.dll")]
static extern IntPtr WindowFromPoint(POINT Point);

User-Defined Types:

POINT

Notes:

The WindowFromPoint function retrieves a handle to the window that contains the specified point.

Tips & Tricks:

Please add some!

Sample Code:

Please add some!

Alternative Managed API:

Do you know one? Please contribute it!

VB Signature:

Imports System.Runtime.InteropServices

Module test

<DllImport("user32.dll")> _

Function WindowFromPoint(ByVal xPoint As Long, _

ByVal yPoint As Long) As Long

End Function

User-Defined Types:

xPoint, yPoint

Notes:

The WindowFromPoint function retrieves a handle to the window that contains the specified point.

Tips & Tricks:

Please add some!

Sample Code:

Dim tPA As Point

Dim lhWnd As Long

tPA = Cursor.Position

x = tPA.X

y = tPA.Y

' Get window handle from point

lhWnd = WindowFromPoint(x, y)

Alternative Managed API:

Do you know one? Please contribute it!

Documentation

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/windows/windowreference/windowfunctions/windowfrompoint.asp