Upravit

Sdílet prostřednictvím


Window.Activate Method

Definition

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

public:
 abstract void Activate();
public abstract void Activate ();
abstract member Activate : unit -> unit
Public MustOverride Sub Activate ()

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()

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.

Applies to