小问题,高手帮下
shell 一个程序,并且获得它的HWND.
[解决办法]
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
Const SW_SHOWNORMAL = 1
Private Sub Form_Load()
Dim hwdApp As Long
hwdApp = ShellExecute(0, vbNullString, "Notepad.exe ", vbNullString, "C:\ ", SW_SHOWNORMAL)
MsgBox hwdApp
End Sub