On Oct 3, 10:14*am, karim <ka...@discussions.microsoft.comwrote:
thank you very much, works great. but I have to click on the label to view
the user name. is there any way to have it show when you open the form with
out clicking the label?
thanks
There's no obligation to put "Label1.Text=My.User.Name" on label's
click event. As you wanted, you can put the code on form's load event
to see UserName in Label1 like this:
Private Sub Form1_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
Label1.Text = My.User.Name
End Sub
Hope this helps,
Onur Güzel