次の方法で共有


Window.Activate Method

Activates (gives focus to) the window that is represented by the Window object.

Namespace:  Microsoft.Office.InfoPath
Assembly:  Microsoft.Office.InfoPath (in Microsoft.Office.InfoPath.dll)

Syntax

'Declaration
Public MustOverride Sub Activate
'Usage
Dim instance As Window

instance.Activate()
public abstract void Activate()

Remarks

The Activate method can be used when more than one InfoPath form is open to give focus to the window represented by the referenced Window object.

The Activate method can be used only with the editing window types; if used with a designing window type, it will raise an exception.

To determine whether a window is the active window, use the Active property.

This member can be accessed only by forms running in the same domain as the currently open form, or by forms that have been granted cross-domain permissions.

This type or member can be accessed only from code running in forms opened in Microsoft InfoPath Filler.

Examples

In the following example, the Activate method of the Window class is used to give focus to the third window in the collection of open windows.

this.Application.XmlForms[2].CurrentView.Window.Activate();
Me.Application.XmlForms(2).CurrentView.Window.Activate()

See Also

Reference

Window Class

Window Members

Microsoft.Office.InfoPath Namespace