Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / August 2005

Tip: Looking for answers? Try searching our database.

How to find what control is under the mouse pointer

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Oleg - 11 Aug 2005 17:48 GMT
Hi,

Does anyone know any way to find what control is under the mouse pointer?
In my application (MDI forms application) I need to track mouse move events
and find what control is currently
under the mouse, it can be MDI child form, button, label, etc.
Maybe some Win API function which finds Handle of the object so I could
convert it to Control using FromHandle method?
Or some .NET managed method?

Thank you for the help,

Oleg
Marcus - 15 Aug 2005 13:50 GMT
Oleg,
You can use either the .NET method Control.GetChildAtPoint or the Win32
API functions WindowFromPoint/ChildWindowFromPoint.

- Marcus

> Hi,
>
[quoted text clipped - 9 lines]
>
> Oleg

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.