Share via


InfoPathControl2.Enable method (Boolean)

Defines a method that must be provided by the developer for InfoPath to call when it needs to enable or disable an instance of the control in a view.

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

Syntax

'Declaration
Sub Enable ( _
    vfEnabled As Boolean _
)
'Usage
Dim instance As InfoPathControl2
Dim vfEnabled As Boolean

instance.Enable(vfEnabled)
void Enable(
    bool vfEnabled
)

Parameters

  • vfEnabled
    Type: System.Boolean

    Specifies whether the control is enabled.

Implements

InfoPathControl.Enable(Boolean)

Remarks

InfoPath will call the Enable method to enable or disable the control, such as when the view is being refreshed or closed, when the document is signed and should not be edited, or when rules are applied to the form that must disable the control.

The InfoPathControl2 and InfoPathControlSite objects and their methods and properties are designed to be used only from the implementation of an ActiveX control. These objects and their members are not supported in InfoPath form code. For more information on how to create ActiveX controls that work with InfoPath, see the InfoPath Developer Center (https://msdn.microsoft.com/infopath).

See also

Reference

InfoPathControl2 interface

InfoPathControl2 members

Enable overload

Microsoft.Office.Interop.InfoPath namespace