Application.User Property (Microsoft.Office.InfoPath)
Gets a reference to the User object.
Namespace: Microsoft.Office.InfoPath
Assembly: Microsoft.Office.InfoPath (in microsoft.office.infopath.dll)
Syntax
'Declaration
Public MustOverride ReadOnly Property User As User
'Usage
Dim instance As Application
Dim value As User
value = instance.User
public abstract User User { get; }
Property Value
A User that represents the current user.
Remarks
This member can be accessed only by forms running in the same domain as the currently open form, or by forms that have been granted cross-domain permissions.
This type or member can be accessed from code running in forms opened in Microsoft Office InfoPath 2007 or in a Web browser.
Example
In the following example, the User property is used to retrieve the User object, and then the UserName property is used to display the current user's user name.
MessageBox.Show(this.Application.User.UserName);
MessageBox.Show(Me.Application.User.UserName)
See Also
Reference
Application Class
Application Members
Microsoft.Office.InfoPath Namespace