Display the name of the user currently logged on.
Display the name of the user currently logged on.
Rate Display the name of the user currently logged on.
(1(1 Vote))
Dim slength As Long
Dim retval As Long
Private Sub Command1_Click()
username = Space(255)
slength = 255
retval = GetUserName(username, slength) ' slength is now the length of the returned string
username = Left(username, slength - 1) ' extract the returned info from the buffer
Text1 = "The name of the current user is " + username
End Sub
Display the name of the user currently logged on. Comments
No comments yet — be the first to post one!
Post a Comment