|
-
May 17th, 2004, 04:29 AM
#1
Thread Starter
Addicted Member
Grabbing the username
Hi All,
can anyone tell me how i can grab the username of the currently logged in user. I did this for a system running on NT4 but it has not transferred across to the 2000 platform.
Many thanks
-
May 17th, 2004, 04:34 AM
#2
Retired VBF Adm1nistrator
What code were you using? You can normally transfer the networking API code across from VB6 fairly easily.
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
May 17th, 2004, 05:47 AM
#3
Environment.Username()
Gets the name of the dude that started the current thread.
I don't live here any more.
-
May 17th, 2004, 05:59 AM
#4
Retired VBF Adm1nistrator
Originally posted by wossname
Environment.Username()
Gets the name of the dude that started the current thread.
But under NT once can start a process under a different username
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
May 17th, 2004, 06:19 AM
#5
Hi.
In that case, use SystemInformation.UserName
According to the help, it should return the user currently logged on to the system.
I wish I could think of something witty to put in my sig...
...Currently using VS2013...
-
May 18th, 2004, 02:15 AM
#6
Originally posted by plenderj
But under NT once can start a process under a different username
I did always despise NT with a passion.
I don't live here any more.
-
May 18th, 2004, 02:40 AM
#7
Retired VBF Adm1nistrator
Originally posted by wossname
I did always despise NT with a passion.
NT is the future my friend
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
May 18th, 2004, 03:05 AM
#8
Atari ST's are coming back too.
I don't live here any more.
-
May 25th, 2004, 04:22 AM
#9
Thread Starter
Addicted Member
thanks for your help everyone,
apologies for the delay in replying, i have been working away. I will try migrating my existing code and try some of the options you have suggested.
Col
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
|