FormControl Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
A hostable object that is used to integrate the InfoPath form editing environment into a .NET-based custom application.
public ref class FormControl : System::Windows::Forms::AxHost
[System.Windows.Forms.AxHost/Clsid("{80757399-5146-11d5-a672-00b0d022e945}")]
public class FormControl : System.Windows.Forms.AxHost
type FormControl = class
inherit AxHost
Public Class FormControl
Inherits AxHost
- Inheritance
-
FormControl
- Attributes
-
System.Windows.Forms.AxHost/ClsidAttribute
Remarks
The FormControl editor object provides various properties and methods to open and close form templates, as well as to communicate with the host environment for .NET-based custom applications. The Microsoft.Office.InfoPath.Server assembly provides the hostable XmlFormView control for use in custom Web pages (.aspx).
For more information about the FormControl object, see Hosting the InfoPath Form Editing Environment in a Custom Windows Form ApplicationXmlFormView control in custom Web pages, see Hosting the InfoPath Form Editing Environment in a Custom Web Form
Constructors
FormControl() |
Properties
DataConnectionBaseUrl |
Gets or sets the base URL to be used with data connection files (.UDCX). |
Enabled |
Gets or sets a value indicating whether the control represented by the FormControl object can respond to user interaction. |
EventManager |
Gets an EventManager object which is used to bind event handlers in the InternalStartup event. |
Host |
Gets or sets the object used to access the object model of the host application. |
HostName |
Gets or sets the name of the host application. |
HostTranslatesAcceleratorsFirst |
Gets or sets a value that indicates the order in which keystrokes are sent to the control represented by the FormControl object or to the application hosting the control. |
XmlForm |
Gets an XmlForm object associated with the hosted FormControl object. |
Methods
AttachInterfaces() | |
Close() |
Closes the active form in the FormControl object. |
NewFromFormTemplate(String, AppDomain, String) |
Creates a new form based on a form template (.xsn) file. |
NewFromFormTemplate(String, Stream, XmlFormOpenMode, AppDomain, String) |
Creates a new form based on the specified form template and the data contained in an XML stream. |
NewFromFormTemplate(String, Stream, XmlFormOpenMode) |
Creates a new form based on the specified form template (.xsn) and the data contained in an XML stream. |
NewFromFormTemplate(String) |
Creates a new form based on a form template (.xsn) file. |
Open(Stream, AppDomain, String) |
Opens a form file (.xml) from a file stream and loads it into the FormControl object. |
Open(Stream) |
Opens a form file (.xml) from a file stream (StreamFormControl object. |
Open(String, AppDomain, String) |
Opens a form template file (.xsn) and loads it into the FormControl object. |
Open(String) |
Opens a form file (.xml) and loads it into the FormControl object. |
SetInitEventHandler(IInitEventHandler) |
Sets the event handler in the host application for handling the event that occurs when the form is loaded in the FormControl object. |
SetNotifyHostEventHandler(INotifyHostEventHandler) |
Sets the event handler in the host application for handling the event that occurs when the NotifyHost(String) method of the XDocument object is used to notify the host application. |
SetSubmitToHostEventHandler(ISubmitToHostEventHandler) |
Sets the event handler in the host application for handling the Submit() method of the SubmitToHostAdapter object. |
SyncLastChange() |
Synchronizes the underlying data of the form with changes in the view. |
Events
InternalStartup |
Occurs when the hosted form is started. |