property Command.FilePath as String

Retrieves a value that indicates the file path for an item of ShortCut type.

TypeDescription
String A string expression that indicates the file path.

The following sample shows how to run the application when an item of ShortCut type is selected:

Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Private Const SW_SHOW = 5

Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    Dim i As Long
    i = PopupMenu1.ShowAtCursor
    If (i >= 1234) Then
        ' Is Internet Explorer?
        If i = 1234 Then
            ' You can call ShellExecute API and you can pass argumets!
            ShellExecute 0, "open", PopupMenu1.Command(i).FilePath, "https://www.exontrol.com", "", SW_SHOW
        Else
        ' You can call ShellExecute API and you can pass argumets!
            ShellExecute 0, "open", PopupMenu1.Command(i).FilePath, "", "", SW_SHOW
        End If
    End If
End Sub