# Re: 用shell 来执行外部程式时,如何给以外部程式 参数呢?

Posted by Kent on September 25, 1998 at 17:53:12:

In Reply to: 用shell 来执行外部程式时,如何给以外部程式 参数呢? posted by Chino on September 25, 1998 at 04:45:25:

先宣告以下
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
再用以下程式码
Call ShellExecute(Me.hWnd, "open", "Winamp.exe", "abc.mp3", "", SW_SHOW)
试试看吧,应该可以

Follow Ups: