FocusChangeEvent Class
|
|
Provide information about a FocusChangeEvent, used to indicate a change in window focus (i.e., gaining or losing focus).
Inheritance Hierarchy
Namespace:
VO
Assembly:
VOGUIClasses (in VOGUIClasses.dll) Version: 2.24 GA
SyntaxThe FocusChangeEvent type exposes the following members.
Constructors
Properties|
| Name | Description |
|---|
 | GotFocus |
A logical value determining whether a window has either gained keyboard focus (TRUE) or is about to lose it (FALSE).
|
Top
Remarks
When a window comes in or out of focus, the dispatcher generates a FocusChangeEvent and sends it to Window:FocusChange(). When the input focus changes, the window losing the focus gets a FocusChangeEvent (telling it that it is losing the focus) and the window gaining the focus receives a FocusChangeEvent (telling it that it is gaining the focus).
A window that has focus gets KeyEvents when the user hits the keyboard. This is similar to an active window, but an active window receives MouseEvents instead of KeyEvents.
Tip: Applications using cursors should use FocusChangeEvent to determine whether to create or destroy the cursor.
Examples
The following example locks the attached data server when the window gets focus:
1METHOD FocusChange(oFCE) CLASS TopAppWindow
2IF(oFCE:GotFocus)
3Server:RLock()
4ELSE
5Server:Unlock()
6ENDIF
See Also