Private Declare Function GetForegroundWindow Lib "user32" () As Long Private Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hwnd As Long,ByVal lpString As String,ByVal cch As Long) As Long Private Sub Timer1_Timer() Dim l As Long,s As String l = GetForegroundWindow s = String(255,Chr(0)) GetWindowText l,s,255 Msg<a href="/tag/Box/" target="_blank" class="keywords">Box</a> s End Sub