05-28-2012, 04:47 AM
Hi,
Thanks for taking the interest in this post. I am trying to make a system Login using windows username and password I have got the code for the username already which is
What I need is how to confirm the windows password is correct
Example
If John had an account on a windows machine the username will display as John
And then he enters his password the same as he would in windows it then checks Johns permissions and displayers the appropriate form
2 forms
1 Administrator
2 standard users
The code to verify the users rights I have used the following
So the only missing peace to the puzzle is confirming the password
Any help is grateful or if you could give me guidance on where to get this information
Kind Regards
Bradley
Thanks for taking the interest in this post. I am trying to make a system Login using windows username and password I have got the code for the username already which is
Code:
Public Class form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
TextBox1.Text = System.Environment.UserName
End Sub
End Class
What I need is how to confirm the windows password is correct
Example
If John had an account on a windows machine the username will display as John
And then he enters his password the same as he would in windows it then checks Johns permissions and displayers the appropriate form
2 forms
1 Administrator
2 standard users
The code to verify the users rights I have used the following
Code:
Public Class form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If My.User.IsInRole(ApplicationServices.BuiltInRole.Administrator) Then
TextBox2.Text = "Administrator"
Else
TextBox2.Text = "Standard"
End If
End Sub
End Class
So the only missing peace to the puzzle is confirming the password
Any help is grateful or if you could give me guidance on where to get this information
Kind Regards
Bradley