Hi!
I am using DotAnnotate 3.0. I am using the AnnotateViewer
I am trying to let the users change the fonts on an annotation. This is my code below that gets fired when they right click on the selected annotation. What is driving me crazy is that the FontDialog comes up with the Strikeout and the underlined checkboxes already checked even though the text in the original annotation is not underlined or struck out. Am I missing something?
Thanks for your help!
Dim txt As Atalasoft.Imaging.Annotate.TextAnnotation
Dim MyFontDialog As New Windows.Forms.FontDialog
txt = CType(ImageViewer.Annotations.ActiveAnnotation, TextAnnotation)
Dim CurrentFont As New Font(txt.Font, txt.Font.Size)
MyFontDialog.ShowEffects = True
MyFontDialog.ShowColor = False
MyFontDialog.FontMustExist = True
MyFontDialog.ShowApply = False
MyFontDialog.Font = CurrentFont
If MyFontDialog.ShowDialog = Windows.Forms.DialogResult.OK Then
txt.Font = MyFontDialog.Font
ImageViewer.Annotations.ActiveAnnotation.Refresh()
End If
End If
Catch ex As Exception
MsgBox(
"blah, blah: " & ex.Message, MsgBoxStyle.Critical)
End Try