io avevo usato questo:
ma non funge bene, il mio username è gio, mentre la funzione mi restituisce utentecodice:'dichiarazioni Private Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal lpbuffer As String, nSize As Long) As Long 'in form load Dim sBuffer As String Dim lSize As Long sBuffer = Space$(255) lSize = Len(sBuffer) Call GetUserName(sBuffer, lSize) Label25.Caption = Left$(sBuffer, lSize)

Rispondi quotando