Table of contents
TOC
Collapse the table of content
Expand the table of content

SetFocus Method

office 365 dev account|Last Updated: 6/12/2017
|
1 Contributor

Moves the focus to this instance of an object. Syntaxobject. SetFocus The SetFocus method syntax has these parts:

PartDescription
objectRequired. A valid object.

Remarks If setting the focus fails, the focus reverts to the previous object and an error is generated. By default, setting the focus to a control does not activate the control's window or place it on top of other controls. The SetFocus method is valid for an empty Frame as well as a Frame that contains other controls. An empty Frame will take the focus itself, and any subsequent keyboard events apply to the Frame. In a Frame that contains other controls, the focus moves to the first control in the Frame, and subsequent keyboard events apply to the control that has the focus.

© 2018 Microsoft