>Private Declare Function GetForegroundWindow Lib "usre32" () As Long
>Private Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" _
> (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long
Sweet. GetForegroundWindow is just what the doctor ordered. Thanks! I had a 'focus' mindset when searching through the API's and got nowhere. thanks again!~Joe Johnston USA"If ye love wealth better than liberty, the tranquility of servitude better than the animated contest of freedom, go home from us in peace. We ask not your counsel or arms. Crouch down and lick the hands which feed you. May your chains set lightly upon you, and may posterity forget that ye were our countrymen."
~Samuel Adams