hWindow: HWND; sText: array [0..255] of char;
hWindow = GetForegroundWindow(); GetWindowText(hWindow, @sText, 255);