ula*_*aga 4 vb6 exe shellexecute
我是视觉基础的新手。我正在尝试.exe从 VB执行文件。但我没有得到输出。我.exe有命令行参数。以下是我的代码
Private Sub Command1_Click()
Shell "D:\FEP\extractFEPData.exe data.txt", vbNormalFocus
End Sub
Run Code Online (Sandbox Code Playgroud)
在 cmd 提示符下如果我给命令extractFEPData.exe data.txt它正在解析文件。但是在 VB 中单击命令按钮后什么也没有发生。
请帮我。
小智 5
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_HIDE As Long = 0
Private Const SW_SHOWNORMAL As Long = 1
Private Const SW_SHOWMAXIMIZED As Long = 3
Private Const SW_SHOWMINIMIZED As Long = 2
Private Sub Label1_Click()
ShellExecute Me.hwnd, "Open", "G:\PN Technologies\VB\Krishna & Co\KrishnaCo.exe", vbNullString, "C:\", SW_SHOWNORMAL
End Sub
Run Code Online (Sandbox Code Playgroud)