'We assume that the GdViewer1 control has been properly integrated.
Friend WithEvents GdViewer1 As GdPicture14.GdViewer
'Add the event.
AddHandler GdViewer1.BeforeAnnotationAddedByUser, AddressOf GdViewer1_BeforeAnnotationAddedByUser
'Define the event.
Sub GdViewer1_BeforeAnnotationAddedByUser(ByVal AnnotationIdx As Integer) Handles GdViewer1.BeforeAnnotationAddedByUser
Dim annot As GdPicture14.Annotations.Annotation = GdViewer1.GetAnnotationFromIdx(AnnotationIdx)
If TypeOf annot Is GdPicture14.Annotations.AnnotationStickyNote Then
CType(annot, GdPicture14.Annotations.AnnotationStickyNote).FillColor = Color.Beige
End If
End Sub
//We assume that the GdViewer1 control has been properly integrated.
//Add the event.
GdViewer1.BeforeAnnotationAddedByUser += GdViewer1_BeforeAnnotationAddedByUser;
//Define the event.
void GdViewer1_BeforeAnnotationAddedByUser(int AnnotationIdx)
{
GdPicture14.Annotations.Annotation annot = GdViewer1.GetAnnotationFromIdx(AnnotationIdx);
if (annot is GdPicture14.Annotations.AnnotationStickyNote)
{
((GdPicture14.Annotations.AnnotationStickyNote)annot).FillColor = Color.Beige;
}
}