mouse position in Click-Event

  • Thread starter Thread starter sseidel
  • Start date Start date
S

sseidel

Hi NG,

How can i get the Mouse position in a Click-Event (parameter of method
is a EventArgs object!)?

Thanks and Regards,
Stefan
 
sseidel,

You have two options. The first is to code against the MouseDown event,
which passes this information to the event handler. The other option is to
use the static Position property on the Cursor class, translating from
screen coordinates to your control's local coordinates (if you need to).

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

sseidel said:
Hi NG,

How can i get the Mouse position in a Click-Event (parameter of method
is a EventArgs object!)?

Thanks and Regards,
Stefan
 
Back
Top