LordKusa

Obtener Usuario

May 21st, 2018
76
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Private Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long
  2.  
  3. Private Sub Command1_Click()
  4.  
  5.     Dim strBuffer As String * 256
  6.  
  7.     GetUserName strBuffer, Len(strBuffer)
  8.  
  9.     Label1.Caption = strBuffer
  10.  
  11. End Sub
RAW Paste Data