curiosity
curiosity

Reputation: 1233

to find whether the mouse is moving over particular control or point on screen

How to know whether the mouse is moving over the particular control or point on screen..

Dont ask me to use mouse events of controls.. i want to trace points

in windows form....

Actually i have a combobox and some items in there in the combobox, when the mouse moves over the items when the combobox is dropped down state, the tooltip for the respective item over which the mouse is, should be displayed

Upvotes: 1

Views: 223

Answers (1)

SLaks
SLaks

Reputation: 887405

Like this:

if (someControl.RectangleToScreen(someControl.ClientRectangle).Contains(MousePosition))

However, this won't work for the items in a combobox.

Upvotes: 1

Related Questions