VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Get Logon ID from Network. Brilliant for NT based Databases or Apps

by SCC (9 Submissions)
Category: Miscellaneous
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Mon 10th May 2004
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Get Logon ID from Network. Brilliant for NT based Databases or Apps

API Declarations


Function GetUsername()
'Need Some Code? Request it at www.smokecrack.co.uk
Dim EnvString, MyName
EnvString = "?"
indx = 1
Do While Not EnvString = ""
EnvString = Environ(indx)
If Left$(EnvString, 8) = "USERNAME" Then GoTo yes
indx = indx + 1
Loop

MsgBox "COULD NOT FIND ENVIRONMENT STRING - FATAL ERROR!", 16, "FATAL ERROR"



yes:
GetUsername = Right$(EnvString, 7)
End Function

Rate Get Logon ID from Network. Brilliant for NT based Databases or Apps




Text0.Value = GetUsername

if text0.value = is not null then MsgBox "Need Some Code? Request it at www.smokecrack.co.uk" 

End Sub

Download this snippet    Add to My Saved Code

Get Logon ID from Network. Brilliant for NT based Databases or Apps Comments

No comments have been posted about Get Logon ID from Network. Brilliant for NT based Databases or Apps. Why not be the first to post a comment about Get Logon ID from Network. Brilliant for NT based Databases or Apps.

Post your comment

Subject:
Message:
0/1000 characters