|
-
Apr 16th, 2001, 01:00 AM
#1
Thread Starter
Lively Member
Is there a way for me to catch that my application is no longer the active application?
-
Apr 16th, 2001, 06:47 AM
#2
Addicted Member
Code:
Declare Function GetActiveWindow Lib "user32" Alias "GetActiveWindow" () As Long
If GetActiveWindow <> Form1.hWnd then
'what happens if your application isn't the active one
end if
\
you can change the form1 to whatever form is your main form
-
Apr 16th, 2001, 08:57 AM
#3
Make sure you place that code in a Timer, otherwsie the code with not execute.
-
Apr 16th, 2001, 10:45 AM
#4
You can also subclass the form to detect when your form has lost focus, take a look at this post for an example.
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
|