AnnHitTest Example for Visual Basic
If RasterAnn.AnnHitTest (RasterAnn.AnnContainer, 100, 100) = ANN_HIT_BODY Then
hObj = RasterAnn.AnnHitTestObject
RasterAnn.AnnSetName hObj, True, "AnnHitFound", False
Dim objType As AnnObjectType
RasterAnn.AnnGetType hObj
ObjType = RasterAnn.AnnType
If objType = ANN_OBJECT_TEXT Then
CommonDialog1.FontBold = RasterAnn.AnnGetFontBold (hObj)
CommonDialog1.FontItalic = RasterAnn.AnnGetFontItalic (hObj)
CommonDialog1.FontStrikethru = RasterAnn.AnnGetFontStrikeThrough (hObj)
CommonDialog1.FontUnderline = RasterAnn.AnnGetFontUnderline (hObj)
CommonDialog1.FontName = RasterAnn.AnnGetFontName (hObj)
CommonDialog1.FontSize = RasterAnn.AnnGetFontSize (hObj)
CommonDialog1.Flags = cdlCFBoth
CommonDialog1.ShowFont
RasterAnn.AnnSetFontBold hObj, CommonDialog1.FontBold, False
RasterAnn.AnnSetFontItalic hObj, CommonDialog1.FontItalic, False
RasterAnn.AnnSetFontStrikeThrough hObj, CommonDialog1.FontStrikethru, False
RasterAnn.AnnSetFontUnderline hObj, CommonDialog1.FontUnderline, False
RasterAnn.AnnSetFontName hObj, CommonDialog1.FontName, False
RasterAnn.AnnSetFontSize hObj, CommonDialog1.FontSize, False
Dim bShow As Boolean
RasterAnn.AnnSetText hObj, RasterAnn.AnnGetText(hObj) + RasterAnn.AnnGetName (hObj, bShow), False
End If
End If