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

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Wednesday, April 27, 2016 9:43:57 AM(UTC)

Walter  
Walter

Groups: Tech Support
Posts: 366

Thanks: 1 times
Was thanked: 4 time(s) in 4 post(s)

Attached is a very simple Visual Studio 2015 WinForms project using LEADTOOLS 19 that illustrates how to set AnnAutomationManager.RestrictDesigners property to keep annotations within the area of the image in the viewer. In addition to setting this boolean property, you also need to set the container size using the AnnContainerMapper.SizeToContainerCoordinates() method.

Note: This will only work when an image is in the viewer, so a good practice is to put this code in the ItemChanged event of the viewer so that anytime an image is loaded, it will set the container size correctly.
File Attachment(s):
SimpleWinformsAnnotations.zip (15kb) downloaded 103 time(s).
Walter Bates
Senior Support Engineer
LEAD Technologies, Inc.
LEAD Logo
 

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.

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.044 seconds.