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 : Tuesday, March 21, 2006 6:45:49 PM(UTC)
csyemily

Groups: Registered
Posts: 9





Leadtools 14.5 Annotation Problem:

Question:
i am writing a form (say form1) with a rasterimageviewer for viewing the image with annotation by using vb.net. In this form, another form (say form2) will be shown when a "EDIT" button on Form1 is clicked. In this form (form2), user can edit the image by using annotation tools. When form2 is closed, the image in form1 will be reloaded again by using codes.load() and AnnCodecs.Load() method. However, the image will be shown with the previous and the new edited annotation.
>> It means that both original and new added annotated objects will be shown in the rasterimageviwer of form1 after reload the image.

i try to use RasterImageViewer.Invalidate(myContainer.InvalidRectangle) to reprint the anncontainer of the rasterimageviewer. However, the problem still present. Please advice. Thanks.

 

 

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 : Thursday, March 23, 2006 6:06:49 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,326

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

Hello,

You may try to solve this by defining a global temp AnnContainer object to hold the annotations that comes from form2 and add them to the container in Form1 as follows:
- When close Form2, save the form2Anncontainr in the temp AnnContainer object:
+-------------------------------+
Private Sub Form2_Closed (ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Closed
AnnTempCont = AutomationAnn2.Container
End Sub
+-------------------------------+

- Then, add the objects from the temp AnnContainer to the objects in the form1Anncontainr:
+-------------------------------+
For i = 0 To AnnTempCont.Objects.Count - 1
AutomationAnn.Container.Objects.Add(AnnCont.Objects(i))
Next
+-------------------------------+

In this way, there is no need to use the AnnCodecs.Load method to load the new Annotations.

Please try the above instructions and let me know ho it goes.

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
#3 Posted : Sunday, March 26, 2006 9:50:58 PM(UTC)
csyemily

Groups: Registered
Posts: 9


Thanks.
The correct annotation had been retrieved by using the coding mentioned from your replied message with the following code. ( to remove the object from the automation container )

Dim i As Integer
        If automation.Container.Objects.Count > 0 Then
            For i = 0 To automation.Container.Objects.Count - 1
                automation.Container.Objects.Remove(automation.Container.Objects(0))
            Next
        End If
 
#4 Posted : Tuesday, March 28, 2006 1:24:41 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,326

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

Hello,

Does this mean that the problem is fixed now?
Do you still need further assistance?

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
#5 Posted : Tuesday, March 28, 2006 10:11:31 PM(UTC)
csyemily

Groups: Registered
Posts: 9


yes . the problem is fixed. Thanks.

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