Code: Pascal [Select][+][-]procedure TForm1.OnFocusChange(sender: tobject);begin if screen.ActiveControl <>nil then FPrevWndProc := Windows.WNDPROC(SetWindowLongPtr(screen.ActiveControl.Handle, GWL_WNDPROC, PtrUInt(@WndCallback)));end;