-
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
-
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