VB.NET BASIC

Label1.Text = System.Security.Principal.WindowsIdentity.GetCurrent().Name

 

or

 

If User.Identity.IsAuthenticated Then
    Label1.Text = User.Identity.Name
Else
    Label1.Text = "No user identity available."
End If