在VB中,如何用一个菜单项调用一个帮助文件或打开一个网页。

解决方案 »

  1.   

    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 LongSub opensomething(ByVal filepath As String)
     ShellExecute hwnd, "open", filepath, vbNullString, vbNullString, 5
    End Sub'写到菜单项的CLICK事件中'打开网页:opensomething "http://community.csdn.net/Expert/topic/4720/4720759.xml?temp=.3265802"
    '打开帮助文件: opensomething "d:\abc.hlp"