|
-
Nov 25th, 1999, 08:24 AM
#2
Addicted Member
Hi Death,
You can use this set of commands.
----------------------
Private Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal rsBuffer As String, rlSize As Long) As Long
Option Explicit
Private Sub Form_Load()
Dim dsBuffer As String
Dim dlSize As Long
dsBuffer = Space$(255)
dlSize = Len(dsBuffer)
Call GetUserName(dsBuffer, dlSize)
If (dlSize > 0) Then
Me.txtUserID.Text = Left$(dsBuffer, dlSize)
Else
Me.txtUserID.Text = vbNullString
End If
End Sub
-------------
Does it help ?
Regards
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|