Public 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
调试欢乐多
Shell str1,1
程序图例 --------------------------------------------------------------------------------
'说明:表单一个;命令按钮一个为CmdRun
Option ExplicitPrivate Declare Function RunDialog Lib "shell32" Alias "#61" _
(ByVal hOwner As Long, _
ByVal Unknown1 As Long, _
ByVal Unknown2 As Long, _
ByVal szTitle As String, _
ByVal szPrompt As String, _
ByVal uFlags As Long) As Long
Private Declare Function ChangeIconDialog Lib "shell32" Alias "#62" _
(ByVal hOwner As Long, _
ByVal szFilename As String, _
ByVal Reserved As Long, _
lpIconIndex As Long) As LongPrivate Sub cmdRun_Click()'RunDialog hWnd, 0, 0, vbNullString, vbNullString, 1 '隐藏浏览按钮
RunDialog hWnd, 0, 0, vbNullString, vbNullString, 0 '显示浏览按钮End Sub
而Win2k的shell32.dll与Win98的不一样
可能很轻松的实现,而且非常漂亮