|
-
Apr 25th, 2000, 09:11 PM
#1
Thread Starter
Addicted Member
I wonder about activating windows...(daa?)
When I run my program and make another one active, I want it to - after a short period of time - become active again. I.e. not having to use Alt+Tab or similar.
Is there a command or a property for this?
Cheers, Pentax
Wilhelm Tunemyr,
Swede in London
[email protected]
"Dort, wo man Bücher verbrennt, verbrennt man am Ende auch Menschen"
Heinrich Heine (1797-1856)
Pravda vítezi!
(Truth prevails!)
-
Apr 26th, 2000, 02:13 AM
#2
You could add a timer to your form, set the interval to the number of milliseconds you want between each check and use this code:
Code:
Option Explicit
Private Declare Function GetForegroundWindow Lib "user32" () As Long
Private Sub Timer1_Timer()
If GetForegroundWindow <> Me.hWnd Then
AppActivate Me.Caption
End If
End Sub
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
|