首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VB >

小疑点,高手帮下

2012-02-19 
小问题,高手帮下shell一个程序,并且获得它的HWND.[解决办法]Private Declare Function ShellExecute Libs

小问题,高手帮下
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

热点排行