在VB6中,用shell语句调用IEXPLORE.EXE,假设用户的IEXPLORE.EXE万一不安装到我在程序里写的目录C:\Program Files\Internet Explorer\下
语句是:
Shell "C:\Program Files\Internet Explorer\IEXPLORE.EXE http://ldcmm.com.cn ", 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 Long
Private Const SW_SHOWNORMAL = 1
Private Sub Command1_Click()
ShellExecute 0, "open ", "www.163.com ", vbNullString, CurDir(), SW_SHOWNORMAL
End Sub