| View previous topic :: View next topic |
| Author |
Message |
Gilad_r Centurion
Joined: 03 Mar 2004 Posts: 156
|
Posted: May 8th, 2004 12:01 PM Post subject: IsAltTabWindow |
|
|
[vb:1:e9d1db90e0]
Private Declare Function IsWindowVisible Lib "user32" _
(ByVal hWnd As Long) As Long
Private Declare Function GetWindow Lib "user32" _
(ByVal hWnd As Long, _
ByVal wCmd As Long) As Long
Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" _
(ByVal hWnd As Long, _
ByVal nIndex As Long) As Long
Private Const GW_OWNER As Long = 4
Private Const GWL_EXSTYLE As Long = (-20)
Private Const WS_EX_TOOLWINDOW As Long = &H80
Private Const WS_EX_APPWINDOW As Long = &H40000
Public Function IsAltTabWindow(ByVal hWnd As Long) As Boolean
Dim ex As Long
Dim vis As Boolean
Dim app As Boolean
Dim tool As Boolean
Dim owned As Boolean
vis = IsWindowVisible(hWnd)
ex = (GetWindowLong(hWnd, GWL_EXSTYLE))
app = (ex And Not WS_EX_APPWINDOW) <> ex
tool = (ex And Not WS_EX_TOOLWINDOW) <> ex
owned = GetWindow(hWnd, GW_OWNER) <> 0
IsAltTabWindow = vis And (app Or Not (tool Or owned))
End Function
[/vb:1:e9d1db90e0] _________________ "you should make amends with you" (Incubus)
Last edited by Gilad_r on May 8th, 2004 01:47 PM; edited 1 time in total |
|
| Back to top |
|
P.T.A.M. Administrator

Joined: 08 Oct 2003 Posts: 752 Location: Greece
|
Posted: May 8th, 2004 01:05 PM Post subject: |
|
|
What does this do?  _________________ No one is completely useless. They can at least be an example of what to avoid. |
|
| Back to top |
|
Gilad_r Centurion
Joined: 03 Mar 2004 Posts: 156
|
Posted: May 8th, 2004 01:46 PM Post subject: |
|
|
tells you whether the window appears in the Alt-Tab list... _________________ "you should make amends with you" (Incubus) |
|
| Back to top |
|
|