Ecco ... vedi che non si era capito cosa volessi fare ...
Se inserisci una label e un timer impostato a 100 o 200 millisecondi, questo codice potrebbe darti un'idea ...
codice:
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 h As Long
Dim b As String
h = GetForegroundWindow
If h = 0 Then Exit Sub
b = Space(512)
GetWindowText h, b, Len(b)
label1.Caption = Left$(b, InStr(b, Chr$(0)) - 1)
End Sub