SetFocus Event | ||||||||||||
Applies to: CbtEvents object Occurs when the keyboard focus is about to move from one window to another. Syntax:Public Event SetFocus(ByRef Window
As Window, ByRef PreviousWindow
As Window, ByRef Cancel
As Boolean) The CreateWindow event syntax has these parts:
Remarks:If the keyboard focus is within a Visual Basic application, then the SetFocus event will be triggered prior to the VB defined GotFocus event of the control gaining the focus. Consequently, Screen.ActiveControl will contain a reference to the previously active control. Example:
|