GdPicture.NET.14
GdPicture14 Namespace / GdViewer Class / AnnotationMoved Event
Example





In This Topic
AnnotationMoved Event (GdViewer)
In This Topic
This event is raised right after a GdPicture/XMP annotation has been moved by a user.

Please check the corresponded GdViewer.AnnotationMovedEventHandler for given parameters.

Syntax
'Declaration
 
Public Event AnnotationMoved As GdViewer.AnnotationMovedEventHandler
public event GdViewer.AnnotationMovedEventHandler AnnotationMoved
public event AnnotationMoved: GdViewer.AnnotationMovedEventHandler; 
In JScript, you can handle the events defined by another class, but you cannot define your own.
public: __event GdViewer.AnnotationMovedEventHandler* AnnotationMoved
public:
event GdViewer.AnnotationMovedEventHandler^ AnnotationMoved
Remarks
Be aware, that this event only handles GdPicture/XMP annotations.
Example
How to add this event to your GdViewer control. This example shows you how to address the currently moved annotation.
'We assume that the GdViewer1 control has been properly integrated.
Friend WithEvents GdViewer1 As GdPicture14.GdViewer
            
'Add the event.
AddHandler GdViewer1.AnnotationMoved, AddressOf GdViewer1_AnnotationMoved
            
'Define the event.
Sub GdViewer1_AnnotationMoved(ByVal AnnotationIdx As Integer) Handles GdViewer1.AnnotationMoved
    Dim annot As GdPicture14.Annotations.Annotation = GdViewer1.GetAnnotationFromIdx(AnnotationIdx)
    MessageBox.Show("The annotation with the index " + AnnotationIdx.ToString() + " has been moved.", "GdViewer.AnnotationMoved")
End Sub
//We assume that the GdViewer1 control has been properly integrated.
            
//Add the event.
GdViewer1.AnnotationMoved += GdViewer1_AnnotationMoved;
            
//Define the event.
void GdViewer1_AnnotationMoved(int AnnotationIdx)
{
    GdPicture14.Annotations.Annotation annot = GdViewer1.GetAnnotationFromIdx(AnnotationIdx);
    MessageBox.Show("The annotation with the index " + AnnotationIdx.ToString() + " has been moved.", "GdViewer.AnnotationMoved");
}
See Also