Public Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long
Public Function GetUser() As String
Dim strUser As String, lName As Long
strUser = Space$(255)
lName = GetUserName(strUser, 255)
GetUser = strUser
End Function
Get User Name
code:
0 comments:
Post a Comment