|
-
Aug 10th, 2012, 11:25 PM
#5
Re: my. and sub main
Um, that's not "the" GetUserName function. That function is not part of the .NET Framework. That is an example of a function that you can write yourself that uses My.User internally. That GetUserName function couldn't possibly have worked in VB6, so it must have been a different GetUserName function. I don't know whether My.User doesn't work without the application framework enabled but, as I said, you can just use Environment.UserName to get the name of the logged on user. If your app is using custom authentication then I'm not sure that that will work, but I'm guessing that you're not using custom authentication.
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
|