Click here to Skip to main content
15,917,610 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Runtime Controls in VB6 Pin
SimulationofSai29-May-07 0:11
SimulationofSai29-May-07 0:11 
QuestionGet current user's logon password Pin
Steven J Jowett28-May-07 23:21
Steven J Jowett28-May-07 23:21 
AnswerRe: Get current user's logon password Pin
Navneet Hegde28-May-07 23:32
Navneet Hegde28-May-07 23:32 
GeneralRe: Get current user's logon password Pin
Steven J Jowett28-May-07 23:39
Steven J Jowett28-May-07 23:39 
GeneralRe: Get current user's logon password Pin
Navneet Hegde29-May-07 0:03
Navneet Hegde29-May-07 0:03 
AnswerRe: Get current user's logon password Pin
SimulationofSai28-May-07 23:58
SimulationofSai28-May-07 23:58 
GeneralRe: Get current user's logon password Pin
Steven J Jowett29-May-07 0:10
Steven J Jowett29-May-07 0:10 
GeneralRe: Get current user's logon password Pin
Kiran Kumar B29-May-07 17:31
Kiran Kumar B29-May-07 17:31 
Hi,

I am now providing the code written for you in VB6. I will rewrite it in VB.NET and get back to you when I am free. I didn't find any API to retrieve password or hashed password. So, for username try this. I am providing you two ways. you can use anyone.

'Declare the API functions to access username.<br />
Private Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long<br />
Private Declare Function GetEnvironmentVariable Lib "kernel32" Alias "GetEnvironmentVariableA" (ByVal lpName As String, ByVal lpBuffer As String, ByVal nSize As Long) As Long<br />
<br />
Dim kName As String * 255   ' For storing username with 255 char buffer.<br />
Dim kEnvVar As String * 255<br />
<br />
Private Sub Command1_Click()<br />
Call GetUserName(kName, 255) ' First method of direct accessing username using API<br />
MsgBox kName<br />
Call GetEnvironmentVariable("USERNAME", kEnvVar, 255) '2nd method which uses windows environment variable to access the username<br />
MsgBox kEnvVar<br />
End Sub


'-----------
' I hope this helps.
' Thanks, Kiran Kumar
GeneralRe: Get current user's logon password Pin
Kiran Kumar B29-May-07 17:35
Kiran Kumar B29-May-07 17:35 
GeneralRe: Get current user's logon password Pin
Steven J Jowett29-May-07 22:10
Steven J Jowett29-May-07 22:10 
QuestionCreating VPN Pin
carsell28-May-07 23:20
carsell28-May-07 23:20 
QuestionFlexGrid in VB6 Pin
Kumaran21cen28-May-07 23:14
Kumaran21cen28-May-07 23:14 
AnswerRe: FlexGrid in VB6 Pin
Navneet Hegde28-May-07 23:45
Navneet Hegde28-May-07 23:45 
QuestionRestarting a socket Pin
Diego F.28-May-07 22:54
Diego F.28-May-07 22:54 
AnswerRe: Restarting a socket Pin
ne0h29-May-07 0:36
ne0h29-May-07 0:36 
GeneralRe: Restarting a socket Pin
Diego F.29-May-07 0:42
Diego F.29-May-07 0:42 
GeneralRe: Restarting a socket Pin
Kiran Kumar B29-May-07 17:44
Kiran Kumar B29-May-07 17:44 
GeneralRe: Restarting a socket Pin
Diego F.29-May-07 21:50
Diego F.29-May-07 21:50 
QuestionCrystal Report Takes too Much Time Pin
Rupesh Kumar Swami28-May-07 22:13
Rupesh Kumar Swami28-May-07 22:13 
AnswerRe: Crystal Report Takes too Much Time Pin
Steven J Jowett28-May-07 23:14
Steven J Jowett28-May-07 23:14 
GeneralRe: Crystal Report Takes too Much Time Pin
Rupesh Kumar Swami29-May-07 0:29
Rupesh Kumar Swami29-May-07 0:29 
QuestionImporting COM Components Pin
Zaegra28-May-07 21:18
Zaegra28-May-07 21:18 
AnswerRe: Importing COM Components Pin
CPallini29-May-07 2:04
mveCPallini29-May-07 2:04 
Questionconnection problem Pin
matjame28-May-07 21:11
matjame28-May-07 21:11 
AnswerRe: connection problem Pin
WhiteGirl2328-May-07 23:05
WhiteGirl2328-May-07 23:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.