WindowFromPoint API Example
Category:
System/APIType:
SnippetsDifficulty:
IntermediateAuthor:
Basharat AliVersion Compatibility:
More information:
This code demonstrates how to use the WindowFromPoint API, which returns a handle to a window (whether or not the window is within your application) when the mouse cursor is passed over it. In this particular demo, the window's class name is displayed, but as explained in the comments, there are many other things you can do with a window once you have its handle. The comments also explain how to get the demo running.
Instructions: Copy the declarations and code below and paste directly into your VB project.
Declarations: