Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Username retrieval 1

Status
Not open for further replies.

scooby77

Programmer
Jun 9, 2003
9
0
0
US
I need to retrieve a username from the system and display it in a box on the bottom of the form using vb.net I can’t get it to work like I used to in VB6.
 
The username is referenced like so:

System.Environment.UserName

This is of type "String"... gives you the windows login name. Then you just put it wherever you want it, such as a textbox:

TextBox1.Text = System.Environment.UserName

hth
Ben
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top