visual basic login.pdf

5
3/21/2014 Visual Basic 2008 Login http://www.visual-basic-tutorials.com/form/LoginT.htm 1/5 Visual Basic 2008 More Lessons Login - Visual Basic 2008 This tutorial will show you how to make a login program. Open Visual Basic 2008 / 2010 Express Edition. (If you don't have the program click here to download it for free.) Click on Project next to Create: Click on Windows Form Application, and name the project "Your Application" and then click Ok. 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.: Visual OPC Client .NET technosoftware.com Develop OPC UA Clients. Fast development in C#/VB.NET

Upload: partha-boyal

Post on 16-Aug-2015

219 views

Category:

Documents


3 download

TRANSCRIPT

3/21/2014 Visual Basic 2008 Loginhttp://www.visual-basic-tutorials.com/form/LoginT.htm 1/5Visual Basic 2008 More LessonsLogin- Visual Basic 2008 This tutorial will show you how to make a login program.Open Visual Basic 2008 / 2010 Express Edition. (If you don't have the program click here todownload it for free.)Click on Project next to Create:Click on Windows Form Application, and name the project "Your Application" and then clickOk.You can change the form text to "your application". Click on the form and then go to propertieswindow, then change the text property.You need to add another form to your application. To do that, click on Project on the menubar, then click on Add Windows Form.:

Visual OPC Client .NETtechnosoftware.comDevelop OPC UA Clients. Fast developmentin C#/VB.NET3/21/2014 Visual Basic 2008 Loginhttp://www.visual-basic-tutorials.com/form/LoginT.htm 2/5bar, 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:

3/21/2014 Visual Basic 2008 Loginhttp://www.visual-basic-tutorials.com/form/LoginT.htm 3/5Go 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":

3/21/2014 Visual Basic 2008 Loginhttp://www.visual-basic-tutorials.com/form/LoginT.htm 4/5We need the change the password text property. Right click on the textbox that will hold thepassword, click on properties, go to the properties window. Change the PasswordCharproperty to * :Add a button to the form and change it's text to "Login"Suppose we want the username = rfb and the password = reflectionDouble 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.ClickIf TextBox1.Text = "rfb" And TextBox2.Text = "reflection" ThenForm2.Show()ElseMsgBox("Sorry, username or password not found", MsgBoxStyle.OkOnly, "Invalid")End IfEnd SubYou can change the username and the password in the code where it says "rfb" for the3/21/2014 Visual Basic 2008 Loginhttp://www.visual-basic-tutorials.com/form/LoginT.htm 5/5You can change the username and the password in the code where it says "rfb" for theusername 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: More Lessons

Copyright visual-basic-tutorials.com 2013All Rights Reserved.contact: [email protected] - PDF API'spdf-tools.comView, print, convert, merge, edit For developers: COM, C,Java, .NET