Share via


FormControl.NewFromFormTemplate Method (String, Stream, XmlFormOpenMode)

Creates a new form based on the specified form template (.xsn) 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 _
)
'Usage
Dim instance As FormControl
Dim formTemplateLocation As String
Dim xmlDataStream As Stream
Dim behavior As XmlFormOpenMode

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

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.

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