以下是引用purana在2006-12-8 20:08:18的发言:
Option Explicit
Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Private Const SW_HIDE = 0
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Sub Command1_Click()
Shell "Calc.exe", vbHide
End Sub
Private Sub Command2_Click()
Dim calcHwnd As Long
calcHwnd = FindWindow(vbNullString, "计算器")
If calcHwnd <> 0 Then
ShowWindow calcHwnd, SW_HIDE
End If
End Sub
Option Explicit
Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Private Const SW_HIDE = 0
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Sub Command1_Click()
Shell "Calc.exe", vbHide
End Sub
Private Sub Command2_Click()
Dim calcHwnd As Long
calcHwnd = FindWindow(vbNullString, "计算器")
If calcHwnd <> 0 Then
ShowWindow calcHwnd, SW_HIDE
End If
End Sub
可不可以给出showwindow的所有常数,像隐藏窗体是"0"其它的是什么?谢谢!
/images/2011/147787/2011051411021524.jpg" border="0" />