ScreenTip property
Returns the ScreenTip of the specified hyperlink. Read-only String.
Applies to
Objects: Hyperlink
Syntax
object.ScreenTip
Parameters
Part | Description |
---|---|
object | Required. An expression that returns a Hyperlink object. |
Remarks
To set hyperlinks for a Pushpin set, use the HyperlinkType property on the DataSet object.
To set hyperlinks for a Web page, use the IncludeHyperlinks property on the SavedWebPage object.
Example
Sub FollowFirstLink()
Dim objApp As New MapPoint.Application
Dim objMap As MapPoint.Map
Dim objData As MapPoint.DataSet
Dim objField As MapPoint.Field
Dim objPushpin As MapPoint.Pushpin
Dim objHyperlink As MapPoint.Hyperlink
'Set up application
objApp.Visible = True
objApp.UserControl = True
Set objMap = objApp.ActiveMap
'Let the user import data with the wizard
'There should be one field named "URL"
Set objData = objMap.DataSets.ShowImportWizard
If objData Is Nothing Then Exit Sub
'Make sure that there's a "URL" field
Set objField = Nothing
For i% = 1 To objData.Fields.Count
If UCase(objData.Fields.Item(i%).Name) = "URL" Then
Set objField = objData.Fields.Item(i%)
Exit For
End If
Next i%
If objField Is Nothing Then
MsgBox "Sorry, there is no field named 'URL'"
Exit Sub
End If
'Set the hyperlink field
Let objData.HyperlinkType = geoHyperlinkField
Let objData.HyperlinkField = objField
'Get the hyperlink of the first item in the data set
Set objPushpin = objData.QueryAllRecords.Pushpin
Set objHyperlink = objPushpin.Hyperlink
'Show information about it
Caption$ = "Information on Pushpin " & objPushpin.Name
Caption$ = Caption$ & "'s hyperlink:" & vbCrLf & vbCrLf
Caption$ = Caption$ & "Target: " & objHyperlink.Address & vbCrLf
Caption$ = Caption$ & "Bookmark: " & objHyperlink.Subaddress & vbCrLf
Caption$ = Caption$ & "ScreenTip: " & objHyperlink.ScreenTip & vbCrLf
Caption$ = Caption$ & "Display text: " & objHyperlink.TextToDisplay
Caption$ = Caption$ & vbCrLf & vbCrLf
Caption$ = Caption$ & "Press OK to follow this hyperlink."
MsgBox Caption$
'Follow the link
objHyperlink.Follow
End Sub