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




Reply With Quote