次の方法で共有


View.SwitchView Method

Changes the active view of a Microsoft InfoPath 2010 form to a specified view.

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

Syntax

'Declaration
Sub SwitchView ( _
    bstrName As String _
)
'Usage
Dim instance As View
Dim bstrName As String

instance.SwitchView(bstrName)
void SwitchView(
    string bstrName
)

Parameters

  • bstrName
    Type: System.String

    The name of the view to switch to. If an empty string is used, the default view is displayed.

Remarks

If an empty string is used as the bstrName parameter, the view is changed to the default view of the form.

Important

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.

Examples

In the following example, the SwitchView method of the ViewObject object is used to change the current view to the default view:

thisXDocument.View.SwitchView("");

See Also

Reference

View Interface

View Members

Microsoft.Office.Interop.InfoPath.SemiTrust Namespace