Get User Name.
This is a small but useful code to get the user’s login name from the system.Whenever we make windows apps.It is always not good in addressing the user as guest,user etc.Try..for example this code and address them by the name of what they have logged on.
‘…………Declarations…………………………………………………..
Private Declare Function GetUserName Lib “Advapi32″ Alias “GetUserNameA” (ByVal lpBuffer As String, nSize As Long) As Long
‘…………Function…………………………………………………..
Public Function GetLoginName() As Boolean
Dim s_LoginName as string
s_LoginName = String(20, Chr(0))
GetLoginName = GetUserName(s_LoginName, 20)
End Function
Hope this code will be of great use.
June 14th, 2011 at 7:39 am
55. I’ve read several good stuff here. Definitely worth bookmarking for revisiting. I wonder how much effort you put to make such a excellent informative website.
August 9th, 2011 at 3:28 am
Thank you for your information. Your knowledge in this area is vast and your writing is persuasive and interesting. It’s not often I get to enjoy great writing like this. I hope you write more.
December 8th, 2011 at 8:28 pm
25. I was suggested this web site by my cousin. I am not sure whether this post is written by him as no one else know such detailed about my problem. You are incredible! Thanks!
December 13th, 2011 at 9:29 am
26. Excellent blog here! Also your site loads up fast! What web host are you using? Can I get your affiliate link to your host? I wish my website loaded up as fast as yours lol