AnnGetHyperlinkType example for Visual Basic
'Please note the following:
'LEADRasterView1 refers to a LEADRasterView control
'Global declarations
Private WithEvents RasterAnn As LEADRasterAnnotation
Private RasterAnnToolbar As LEADRasterAnnToolBar
'In the Form_Load method:
Set RasterAnn = New LEADRasterAnnotation
Set RasterAnnToolbar = New LEADRasterAnnToolBar
RasterAnn.AnnParentRasterView = LEADRasterView1
'This examples determines the type of the hyperlink and then displays the
'params if the type is ANN_LINK_ANNEVENT or ANN_LINK_ANNEVENT5
Private Sub RasterAnn_OnAnnHyperLink(ByVal hObject As Long, ByVal iParamCount As Integer, ByVal lParam1 As Long, ByVal lParam2 As Long, ByVal lParam3 As Long, ByVal lParam4 As Long, ByVal lParam5 As Long)
Dim msgStr As String
Dim nType As Integer
RasterAnn.AnnGetHyperlinkType hObject
nType = RasterAnn.AnnHyperlinkType
If ((nType = ANN_LINK_ANNEVENT5) Or (nType = ANN_LINK_ANNEVENT)) Then
If iParamCount >= 0 Then
msgStr = CStr(iParamCount) & " params are valid" & Chr(13)
End If
If iParamCount >= 1 Then
msgStr = msgStr & "Param1: " & CStr(lParam1) & Chr(13)
End If
If iParamCount >= 2 Then
msgStr = msgStr & "Param2: " & CStr(lParam2) & Chr(13)
End If
If iParamCount >= 3 Then
msgStr = msgStr & "Param3: " & CStr(lParam3) & Chr(13)
End If
If iParamCount >= 4 Then
msgStr = msgStr & "Param4: " & CStr(lParam4) & Chr(13)
End If
If iParamCount = 5 Then
msgStr = msgStr & "Param5: " & CStr(lParam5) & Chr(13)
End If
Else
msgStr = "Invalid Type"
End If
MsgBox msgStr
End Sub