再请教如何隐藏窗口
Ahmon 2005-03-21 11:48:44 我的程序里运行一个DOS程序,运算时间较长,想将运行窗口隐藏起来。
我参考别的贴子里写了如下语句:
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Private Const SW_HIDE = 0
.........
Private Sub OKButton_Click()
Dim tt As Long
........
ShellWait App.Path + "\" + "*.exe"
tt = FindWindow(vbNullString, App.Path + "\" + "*.exe")
ShowWindow tt, SW_HIDE
运行后根本不隐藏窗口;
直接用Shell WaitApp.Path + "\" + "*.exe",vbHide
倒是隐藏了,可过程太快,程序运算不完
哪位高人出手指点,多谢!