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 »

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: 2303
Joined: Thu Jul 10, 2008 2:21 pm

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

Post by Alex »

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 »

Thanks a lot!!! It works!
Post Reply