AnnotationControllerCreateAnnotation Method (AnnotationUI) |
Namespace: Atalasoft.Annotate.UI
OpenFileDialog dlg = new OpenFileDialog(); dlg.Filter = "Images|*.bmp;*.jpg;*.png;*.tif;*.gif"; if (dlg.ShowDialog(this) == DialogResult.OK) { ReferencedImageAnnotation ann = new ReferencedImageAnnotation(dlg.FileName, true); this.annotateViewer1.Annotations.CreateAnnotation(ann); } dlg.Dispose();
Dim dlg As OpenFileDialog = New OpenFileDialog() dlg.Filter = "Images|*.bmp;*.jpg;*.png;*.tif;*.gif" If dlg.ShowDialog(Me) = DialogResult.OK Then Dim ann As ReferencedImageAnnotation = New ReferencedImageAnnotation(dlg.FileName,True) Me.annotateViewer1.Annotations.CreateAnnotation(ann) End If dlg.Dispose()