|
-
Oct 19th, 2008, 11:48 PM
#1
Thread Starter
Lively Member
Environment ID equivalent in VB6
Hey Peeps,
Would anyone know the equivalent form vb.net to VB6.0 for grabbing the environment.UserName? The below is in vb.net but I need to do the same thing for VB6.0.
messagebox.Show(environment.UserName)
messagebox.Show(my.User.Name)
Thanks,
n3m.
-
Oct 20th, 2008, 12:13 AM
#2
Re: Environment ID equivalent in VB6
try,
MsgBox Environ("USERNAME")
-
Oct 22nd, 2008, 12:14 PM
#3
Re: Environment ID equivalent in VB6
In VB6, I prefer using the GetUserName API
Code:
Private Declare Function GetUserName Lib "advapi32.dll" Alias _
"GetUserNameA" _
(ByVal lpBuffer As String, _
nSize As Long) As Long
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
|