Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[VB6][HELP] How to grab a username?

Banned
Banned
Joined
Jun 24, 2008
Messages
723
Reaction score
1
Hey there.

I'm wondering how to get someones user name from the "Start" bar menu.

I know that in VB.NET it is

Code:
Environment.UserName

But, I don't know about VB6.

Does anyone know?

And is it even possible?
 

Loyal Member
Joined
Feb 26, 2007
Messages
640
Reaction score
255
Visual Basic 6 generally doesn't support it, but according to MSDN, you can do so anyway by creating a COM class in VB.Net, and then including it in your Visual Basic 6 application. Don't mind my vague explanation.

As you can see from Tables 1 and 2, the System.Environment class provides a lot of information that isn't readily accessible from Visual Basic 6. To use the System.Environment class, you can create a simple COM wrapper class in Visual Basic .NET. Once the COM wrapper is created, you can use the System.Environment class from Visual Basic 6, VBA, ASP, VBScript, or any other environment that can use COM objects.

 
Banned
Banned
Joined
Jun 24, 2008
Messages
723
Reaction score
1
Thanks Meth0d

It actually helped

I will see if it works though, then close thread to prevent spam.
 
Back
Top