怎样用GetWindowLong来判断窗口是否可见,求简单的说明一下.有劳大家了。谢谢!!!
Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long
Private Const GWL_STYLE = (-16)
Private Const WS_VISIBLE = &H10000000
Private Sub Command1_Click()
假设要判断的窗口句柄为: lgHwnd
If (GetWindowLong(lgHwnd, GWL_STYLE) And WS_VISIBLE) > 0 Then
MsgBox "窗口可见"
Else
MsgBox "窗口不可见"
End If
End Sub