I never saw this yet so I've posted it here.
First you need a Directory\Whatever you need for.
Code:
C:\Users\UserName\Documents
like this.^
Now we'll do this.
|
V
Remove the () around the "IO"
Code:
If System.(IO).Directory.Exists("C:\Users" + "\" + Environment.UserName + "\" + "Documents") = True Then
'Your Code here
Else
'Your Code here
End If
Or if you want to print it to a label\textbox\button
Code:
label.text = Environment.UserName
textbox.text = Environment.UserName
button.text = Environment.UserName