mouse capture

  • Thread starter Thread starter Dave
  • Start date Start date
D

Dave

Hi,

How can i capture the mouse move event of my window form when i move it
ebove other control?
Thanks!
 
If you have the mouse above another control, the Windows Form will stop
receiving the MouseMove events, and the control which the mouse is above
will get those events. So if you want one event handler for the form and all
controls, you'd have to delegate the controls and forms MouseMove events to
the same event handler.

VB
AddHandler this.MouseMove, AddressOf(MyMouseMoveHandler)
AddHandler (this.Control1.MouseMove, AddressOf(MyMouseMoveHandler)

C#
this.MouseMove += new MouseEventHandler(MyMouseMovehandler)
this.Control1.MouseMove += new MouseEventHandler(MyMouseMovehandler)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top