VB password help
-
im trying to make a program that makes u enter a password inorder to use a program the only problem is that u can see the pass word that istyped i would like to hide it so u just see *** insted of text here is my code .......................................... Public Class Form Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim Password As String Dim InputPassword As String Dim Attempt As Integer Password = "test" Attempt = 0 Do InputPassword = InputBox("Enter password. This is attempt number " & Attempt & ".") Attempt = Attempt + 1 Loop Until (Attempt = 3) Or (InputPassword = Password) If InputPassword = Password Then MsgBox("This password is valid!") Dim F1 As New Form1() F1.Show() Else MsgBox("This password is invalid!") End If End Sub End Class
-
im trying to make a program that makes u enter a password inorder to use a program the only problem is that u can see the pass word that istyped i would like to hide it so u just see *** insted of text here is my code .......................................... Public Class Form Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim Password As String Dim InputPassword As String Dim Attempt As Integer Password = "test" Attempt = 0 Do InputPassword = InputBox("Enter password. This is attempt number " & Attempt & ".") Attempt = Attempt + 1 Loop Until (Attempt = 3) Or (InputPassword = Password) If InputPassword = Password Then MsgBox("This password is valid!") Dim F1 As New Form1() F1.Show() Else MsgBox("This password is invalid!") End If End Sub End Class
I dont think using an InputBox is a very good method. You will need to make a login form.
-
im trying to make a program that makes u enter a password inorder to use a program the only problem is that u can see the pass word that istyped i would like to hide it so u just see *** insted of text here is my code .......................................... Public Class Form Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim Password As String Dim InputPassword As String Dim Attempt As Integer Password = "test" Attempt = 0 Do InputPassword = InputBox("Enter password. This is attempt number " & Attempt & ".") Attempt = Attempt + 1 Loop Until (Attempt = 3) Or (InputPassword = Password) If InputPassword = Password Then MsgBox("This password is valid!") Dim F1 As New Form1() F1.Show() Else MsgBox("This password is invalid!") End If End Sub End Class
-
I dont think using an InputBox is a very good method. You will need to make a login form.
ChandraRam if u could post up the code on how to do that that would be a verry big help
-
This is the Visual Studio forum for the Visual Studio IDE ... not the languages it supports ... your looking for the VB forum which is a few links up ;)
He's already cross posted in the VB forum, I think.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
-
ChandraRam if u could post up the code on how to do that that would be a verry big help
arranmc182 wrote:
post up the code on how to do that
It is pretty straightforward. No different than any other form.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
-
arranmc182 wrote:
post up the code on how to do that
It is pretty straightforward. No different than any other form.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
well im not a programmer at all im doing networking at college and they are making us do some programming as part of it and iv got realy stuck with this one
-
well im not a programmer at all im doing networking at college and they are making us do some programming as part of it and iv got realy stuck with this one
Well, you start with textboxes for the username and password. The textbox for the password, use the
PasswordChar
property to asterisk out the characters being entered. Then, you have your buttons for accept or cancel. I hope this is a start for you :)"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon