Use Active to determine whether the form has focus. The Active Form receives all keyboard input. If it has a title bar, it is drawn using the active colors specified in the Control panel.
If Active is True , the form has focus; if Active is False, the form does not have focus.