Share via


FormControl.NewFromFormTemplate method (String, Stream, XmlFormOpenMode, AppDomain, String)

Creates a new form based on the specified form template and the data contained in an XML stream.

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

Syntax

'Declaration
Public Overridable Sub NewFromFormTemplate ( _
    formTemplateLocation As String, _
    xmlDataStream As Stream, _
    behavior As XmlFormOpenMode, _
    customAppDomain As AppDomain, _
    inputParameters As String _
)
'Usage
Dim instance As FormControl
Dim formTemplateLocation As String
Dim xmlDataStream As Stream
Dim behavior As XmlFormOpenMode
Dim customAppDomain As AppDomain
Dim inputParameters As String

instance.NewFromFormTemplate(formTemplateLocation, _
    xmlDataStream, behavior, customAppDomain, _
    inputParameters)
public virtual void NewFromFormTemplate(
    string formTemplateLocation,
    Stream xmlDataStream,
    XmlFormOpenMode behavior,
    AppDomain customAppDomain,
    string inputParameters
)

Parameters

  • formTemplateLocation
    Type: System.String

    The path or URL to the form template file (.xsn).

  • xmlDataStream
    Type: System.IO.Stream

    The file stream (Stream) containing the XML data used to populate the new form.

  • customAppDomain
    Type: System.AppDomain

    The AppDomain object that represents the application domain in which the application hosting the control is executing.

  • inputParameters
    Type: System.String

    One or more name/value pairs separated by the ampersand (&) character.

Remarks

For more information about the FormControl object, see Hosting the InfoPath Form Editing Environment in a Custom Windows Form Application.

See also

Reference

FormControl class

FormControl members

NewFromFormTemplate overload

Microsoft.Office.InfoPath namespace