如何用windows API函数打开指定窗口

来源:互联网 发布:微软office认证.知乎 编辑:程序博客网 时间:2024/06/01 17:10

 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   Sub   Command4_Click()  

 '打开   "C:/Windows"            

 ShellExecute   Me.hwnd,   "open",   "C:/Windows",   "",   App.Path,   1    

End   Sub

原创粉丝点击