Skip to content

Latest commit

 

History

History
42 lines (28 loc) · 1.38 KB

setfocus-method.md

File metadata and controls

42 lines (28 loc) · 1.38 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
SetFocus method (Microsoft Forms)
fm20.chm5224972
fm20.chm5224972
Office.SetFocus
430b2404-f11f-a0b6-e3b7-4bfe513c9258
11/15/2018
medium

SetFocus method (Microsoft Forms)

Moves the focus to this instance of an object.

Syntax

object. SetFocus

The SetFocus method syntax has these parts:

Part Description
object Required. 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.

See also

[!includeSupport and feedback]