In this section, you will learn how to create a Login Form. Login form serves as the security of the system that deals with the prevention and detection of unauthorized actions by users of a computer system.
How to create a Login Form.
- Open the Visual Basic, select “File” on the menu, hit new and create a new project.
- The New Project dialog will appear.
Select “windows” in the project types, hit the “windows form application” in the templates and name your project “LoginForm” then hit “ok“.
- Drag the 2 TextBoxes, 3 Labels and 2 Buttons into the Forms. It will look like this.
- Double click the form to fire the load event handler of it and do the following code for converting the text in the Password Textbox into Bullets.
Visual Basic1TextBox2.UseSystemPasswordChar = True
- The code in the view code will look like this.
Visual Basic123Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.LoadTextBox2.UseSystemPasswordChar = TrueEnd Sub
- Press F5 to run your project.
To Learn more advanced Login tutorial, just click here.
Readers might read also: