GETFOCUSWindows API Call in RapidQ2.INCWindows

A WinAPI call that gets the handle to the control that receives the keyboard output. This is a keyword in RAPIDQ2.INC

Syntax: hWnd = GETFOCUS()
IF MyButton.Handle = GETFOCUS () THEN      ' code for the keyboard focus on button

You can set which control gets  the focus with SETFOCUS.GetFocus only gets the window associated with your program (calling threadís message queue). GetFocus will return 0 if  another program has the keyboard focus