Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C# Get control at cursor [duplicate]

Tags:

c#

winforms

I'm looking for a way to get a control at where my cursor is pointing to, is there any way to do this in C#?

like image 503
123 Avatar asked Mar 17 '26 19:03

123


1 Answers

Check out the GetChildAtPoint method. Combine it with a handler for the MouseMove or MouseHover event and you have your control under the cursor.

like image 85
Paul Sasik Avatar answered Mar 25 '26 21:03

Paul Sasik