我用一下程序运行一个快捷方式,但是好像没什么反映!!!请大家指点!!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 LongPrivate Sub Command2_Click()
ShellExecute Me.hwnd, "open", "C:\Lotus Notes 6.5", vbNullString, vbNullString, 5
End Sub

解决方案 »

  1.   

    Function GetTargetPath(ByVal LinkName As String)
        On Local Error Resume Next
        Dim Obj As Object
        Set Obj = CreateObject("WScript.Shell")    Dim Shortcut As Object
        Set Shortcut = Obj.CreateShortcut(LinkName)
        GetTargetPath = Shortcut.TargetPath
        Shortcut.SaveEnd Function
    得到应用程序路径后再启动
      

  2.   

    没有,我不知道你上面的那个过程怎么用?? linkname要传入什么参数?
      

  3.   

    还有: 过程中的“WScript.Shell”是什么意思??
      

  4.   

    我在LinkName中传入快捷方式的路径“C:\Lotus Notes 6.5”,过程中Shortcut都是空值。
    而且也不能运行