How to Hide and Show the Password Using a CheckBox in VB.net

How to Hide and Show the Password Using a CheckBox in VB.net

This tutorial is all about How to Hide and Show the Password Using a CheckBox in VB.net Programming Language.
Today, I will teach you how to set your Textbox to “show” and “hide” Password in the User Rgistration Form by using Visual Basic 2008. This will help you determined the password that you have input in the Textbox when registering in the User Registration Form.

What is Visual Basic’s purpose?

The third-generation programming language was created to aid developers in the creation of Windows applications. It has a programming environment that allows programmers to write code in.exe or executable files. They can also utilize it to create in-house front-end solutions for interacting with huge databases. Because the language allows for continuing changes, you can keep coding and revising your work as needed.

However, there are some limits to the Microsoft Visual Basic download. If you want to make applications that take a long time to process, this software isn’t for you. That implies you won’t be able to use VB to create games or large apps because the system’s graphic interface requires a lot of memory and space. Furthermore, the language is limited to Microsoft and does not support other operating systems.

What are the most important characteristics of Visual Basic?

Microsoft Visual Basic for Applications Download, unlike other programming languages, allows for speedier app creation. It has string processing capabilities and is compatible with C++, MFC, and F#. Multi-targeting and the Windows Presentation Framework are also supported by the system, allowing developers to create a variety of Windows apps, desktop tools, metro-style programs, and hardware drivers.

So let’s begin:

How to encrypt password in flutter ... x
How to encrypt password in flutter - Encrypt Decrypt example using Flutter String Encryption library

Open the Visual Basic 2008 and create a new Windows Form Application. After that, do the Form just like this.

showpasswor_form

Double click the checkbox and do this following code in the method. This method will set the password into bullets to hide it, or set it into letters to know the password that you have input exactly according to your desire.

[vbnet]
‘CHECKING IF THE CHECKBOX WAS CHECKED OR NOT.
If CheckBox1.CheckState = CheckState.Checked Then
‘IF TRUE, IT SHOW THE TEXT
txtpass.UseSystemPasswordChar = False
Else
‘IF FALSE, IT WILL HIDE THE TEXT AND IT WILL TURN IT INTIO BULLETS.
txtpass.UseSystemPasswordChar = True
End If
[/vbnet]

Go back to the design views, double click the form and do this following code in the Form_Load.

[vbnet]
‘HIDE THE TEXT OF THE TXTPASS ON THE FIRST LOAD
txtpass.UseSystemPasswordChar = True
[/vbnet]

These are the full codes that you have made.

[vbnet]
Public Class Form1
Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged
‘CHECKING IF THE CHECKBOX WAS CHECKED OR NOT.
If CheckBox1.CheckState = CheckState.Checked Then
‘IF TRUE, IT SHOWS THE TEXT
txtpass.UseSystemPasswordChar = False
Else
‘IF FALSE, IT WILL HIDE THE TEXT AND IT WILL TURN INTO BULLETS.
txtpass.UseSystemPasswordChar = True
End If
End Sub

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
‘HIDE THE TEXT OF THE TXTPASS ON THE FIRST LOAD
txtpass.UseSystemPasswordChar = True
End Sub
End Class
[/vbnet]

Now, press F5 on the keyboard to run your project.

Readers might read also:

1 thought on “How to Hide and Show the Password Using a CheckBox in VB.net”

  1. I see you don’t monetize your page, don’t waste your traffic,
    you can earn extra cash every month because you’ve got high
    quality content. If you want to know how to make extra bucks, search for: Mertiso’s tips best adsense alternative

    Reply

Leave a Comment