|
-
Aug 9th, 2000, 09:23 AM
#1
Thread Starter
Fanatic Member
anyone know a good technique for detecting alt tab or general loss of focus in my app as I have an agent character, and when they leave the app I want to hide the agent...
TIA
-
Aug 9th, 2000, 10:36 AM
#2
Good Ol' Platypus
Use the GetAsyncKeyState API call.... If I'm right (and I usually am ) one of the gurus will come bursting into this thread and post an example-
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
-
Aug 9th, 2000, 10:55 AM
#3
Try this: Make a Form with a Timer and set it's Interval to 1.
Code:
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
Private Const VK_MENU = &H12
Private Const VK_TAB = &H9
Private Sub Timer1_Timer()
If GetAsyncKeyState(VK_MENU) And GetAsyncKeyState(VK_TAB) Then
Print "Alt Tab as pressed"
End If
End Sub
-
Aug 9th, 2000, 11:00 AM
#4
Good Ol' Platypus
Heehee
Looks as if i'm right once again!
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|