How to determine if a mouse click ocurred in the img space?

Questions, comments and suggestions concerning VintaSoft Annotation .NET Plug-in.

Moderator: Alex

Post Reply
leopsc
Posts: 4
Joined: Thu Mar 24, 2011 2:36 pm

How to determine if a mouse click ocurred in the img space?

Post by leopsc » Thu Mar 24, 2011 2:43 pm

Hi!

I have a AnnotationViewer and it has an image. How can I determine if a mouse click occured inside of the image space?

I'm using C# in Visual Studio 2008 (Framework 3.5).

Thanks!

Alex
Site Admin
Posts: 1462
Joined: Thu Jul 10, 2008 2:21 pm

Re: How to determine if a mouse click ocurred in the img space?

Post by Alex » Thu Mar 24, 2011 7:36 pm

Hello,

You can subscribe to the AnnotationViewer.MouseClick event and analyze the position of the mouse cursor in the image using the AnnotationViewer.PointToImage method.

Please read descriptions of the ImageViewer.PointToImage and ImageViewer.PointToControl methods in the documentation.

Best regards, Alexander

leopsc
Posts: 4
Joined: Thu Mar 24, 2011 2:36 pm

Re: How to determine if a mouse click ocurred in the img space?

Post by leopsc » Thu Mar 24, 2011 8:11 pm

Thanks a lot!!! It works!

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests