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
 

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