Welcome Guest! To enable all features, please Login or Register.



Last Go to last post Unread Go to first unread post
#1 Posted : Friday, November 9, 2012 7:05:21 AM(UTC)

Groups: Registered
Posts: 37


I am trying something a little different.  I am using a custom form sort as a floating, hideable toolbox that comes up when the user right clicks on the image.
This works fine except when I enter design mode for annotations.  I know that the annotaion container takes over the mouse click events, but I was wondering if there
is any way that if a user right clicks anywhere on the image(but not an annotation) that I could route the mouse event to the viewer so it could handle that message.

I am using v17.5 with .net libraries


Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Sunday, November 11, 2012 4:55:04 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,326

Was thanked: 1 time(s) in 1 post(s)

You can do this as follows:
1. Disable the context menu by using the following code:
AnnAutomationManager _annManager;
_annManager.ContextMenu = null;

2. Handle the Viewer.MouseDown() event as follows:
private void _viewer_MouseDown(object sender, MouseEventArgs e)
if (_viewer.Image != null && e.Button == MouseButtons.Right)
//Show the toolbox

Maen Badwan
LEADTOOLS Technical Support
#3 Posted : Monday, November 12, 2012 5:14:28 AM(UTC)

Groups: Registered
Posts: 37

Thanks Maen, I will give this a try.
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.039 seconds.