Share via


XmlForm.HostName Property (Microsoft.Office.InfoPath)

Gets the name of the application hosting InfoPath as a control.

Namespace: Microsoft.Office.InfoPath
Assembly: Microsoft.Office.InfoPath (in microsoft.office.infopath.dll)

Syntax

'Declaration
Public MustOverride ReadOnly Property HostName As String
'Usage
Dim instance As XmlForm
Dim value As String

value = instance.HostName
public abstract string HostName { get; }

Property Value

The name of the host application.

Remarks

This property is intended for use in scenarios where InfoPath is hosted as a control in another application and code running in InfoPath needs to access the name of the host application. Typically the host application name returned will be used in the title bar text of dialog boxes instead of "Microsoft Office InfoPath".

For a brief overview of hosting InfoPath in another application, see "The InfoPath Editor Hosted as a Control" in What's New for InfoPath Developers. For detailed information about hosting InfoPath in another application, see the article titled "Hosting the InfoPath 2007 Editing Environment in a Custom Windows Form Application" on the InfoPath Developer Portal on MSDN.

This member can be accessed without restrictions.

This type or member can be accessed only from code running in forms opened in Microsoft Office InfoPath 2007.

See Also

Reference

XmlForm Class
XmlForm Members
Microsoft.Office.InfoPath Namespace