Window.FocusChange Method | |
Provide a method that is invoked when the input focus changes from the current window to another (or vice versa).
Namespace:
VO
Assembly:
VOGUIClasses (in VOGUIClasses.dll) Version: 2.21
Syntax VIRTUAL METHOD FocusChange(
oFocusChangeEvent
) AS USUAL CLIPPER
[ClipperCallingConventionAttribute(new string[] { ... })]
public virtual Usual FocusChange(
Usual oFocusChangeEvent = default
)
Request Example
View SourceParameters
- oFocusChangeEvent (Optional)
- Type: Usual
The FocusChangeEvent object that identifies whether the focus is being gained or lost.
Return Value
Type:
UsualThis method calls Window.Default() and returns the result of Window.Default()
Remarks Tip |
---|
Important! This is a callback method used by X#.
Normally, it should not be called in your application code.
|
If your window uses cursors, you should hide the window's cursor when the focus is changed to a different window, and then show the cursor when the window receives focus again. This should be used in conjunction with the Window:Activate() and Window:Deactivate() event handlers.
Examples
This example demonstrates how Window:FocusChange() displays the cursor at the specified cursor position when focus is gained. If the focus is lost, the cursor is hidden:
1METHOD FocusChange(oFocusChangeEvt) CLASS MyTopAppWindow
2IF oFocusChangeEvt:GotFocus
3oMyCursor:Show()
4oMyCursor:Position := oMyCursorPos
5ELSE
6oMyCursorPos := oMyCursor:Position
7oMyCursor:Hide()
8ENDIF
See Also