Creating a Log In Application Program In Visual Basic 2008/2010/.NET - VB Tutorials - Basics Projects
http://ingenuitydias.blogspot.com/2014/04/creating-log-in-application-program-in.html
This tutorial will show you how to make a log in program In Visual Basic 2008/2010/.NET.
Click on Project next to Create:
Click on Windows Form Application, and name the project "Your Application" and then click Ok.
More Visual basic Codes:
Creating Your First project in Visual Basic 2008/2010/.NET
Phone Book Application Program
Creating a Log In Application Program In Visual Basic 2008
Analog Clock In Visual Basic 2008/2010/.NET
You can change the form text to "your application". Click on the form and then go to properties window, then change the text property.
You need to add another form to your application. To do that, click on Project on the menu bar, then click on Add Windows Form.:
A new window will appear. Click on Add:
Add a new Label and change it's text to whatever you like:
Go back to Form1:
Add a label and a textbox to the form. Change the label's text to "Username":
Add another label and a textbox to the form. Change the label's text to "Password":
We need the change the password text property. Right click on the textbox that will hold the password, click on properties, go to the properties window. Change the PasswordChar property to * :
Add a button to the form and change it's text to "Login"
suppose we want the username = rfb and the password = reflection
Double click on the button and add the following highlighted code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) HandlesButton1.Click
If TextBox1.Text = "rfb" And TextBox2.Text = "reflection" Then
Form2.Show()
Else
MsgBox("Sorry, username or password not found", MsgBoxStyle.OkOnly, "Invalid")
End If
End Sub
You can change the username and the password in the code where it says "rfb" for the username and "reflection" for the password.
Run the program and it should work fine.
If you enter a wrong username or a wrong password, you should get the following message:
If you enter the right username and the right password, the second form will appear:
We will Up load the project source code and working exe ASAP.Keep visiting.
Click on Project next to Create:
Click on Windows Form Application, and name the project "Your Application" and then click Ok.
More Visual basic Codes:
Creating Your First project in Visual Basic 2008/2010/.NET
Phone Book Application Program
Creating a Log In Application Program In Visual Basic 2008
Analog Clock In Visual Basic 2008/2010/.NET
You can change the form text to "your application". Click on the form and then go to properties window, then change the text property.
You need to add another form to your application. To do that, click on Project on the menu bar, then click on Add Windows Form.:
A new window will appear. Click on Add:
Add a new Label and change it's text to whatever you like:
Go back to Form1:
Add a label and a textbox to the form. Change the label's text to "Username":
Add another label and a textbox to the form. Change the label's text to "Password":
We need the change the password text property. Right click on the textbox that will hold the password, click on properties, go to the properties window. Change the PasswordChar property to * :
Add a button to the form and change it's text to "Login"
suppose we want the username = rfb and the password = reflection
Double click on the button and add the following highlighted code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) HandlesButton1.Click
If TextBox1.Text = "rfb" And TextBox2.Text = "reflection" Then
Form2.Show()
Else
MsgBox("Sorry, username or password not found", MsgBoxStyle.OkOnly, "Invalid")
End If
End Sub
You can change the username and the password in the code where it says "rfb" for the username and "reflection" for the password.
Run the program and it should work fine.
If you enter a wrong username or a wrong password, you should get the following message:
If you enter the right username and the right password, the second form will appear:
We will Up load the project source code and working exe ASAP.Keep visiting.
visual basic example codes
ReplyDelete