Show/Hide in Password Field | C Sharp Winform | Visual Studio 2019 | Code Screens

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this video let us create a login form in c-sharp winform which shows and hides the password field this simple login form is very easy to design we use Visual Studio 2019 for this let us start designing this without wasting time open visual studio and select create a new project search for Windows forms app in c-sharp and selected rename your project I will name it as Joe HOD select create and your winform will load let us change the back color of the form now change the font to konso TLAs and size to 12 you we also change the form style for color and form text you set the form size manually and change the start position to center screen you next go to the tool box and search for a picture box select and drag it to the forum you let us now choose the image I will import my logo into the picture box you select the size mode to zoom so that the full image is visible in the toolbox select a label and drag it to the form then change its text you copy the label now and change its text to password you now let us change their properties in common select both the labels and change its flat style to flat next search for a text in the toolbox and selectively you adjust its size and then copy the text box the two text fields would be used for the username and password now let us change their properties in common select them both and change the following properties you next search for button control drag two buttons into the forum resize the buttons and align them properly with the other controls you now select the buttons and change their text to sign in and sign up respectively you now select the buttons in common and change their flat style border size and back color you we again select a button from the tool box we then copy the button these buttons will act as our show and hide buttons resize the buttons with respect to the password field to place them over it you then select those buttons and edit their properties also make its style flat you they need no text clear their text as we would use only an image you next let us import images into the buttons one would be used for showing the password and another for hiding it you the eye symbol is for show password the cancelled I is for hide password let us implement the coding now click the buttons to go to its respective coding you for the show password we use a if statement to check whether the text field has the password characters star you if that is the case it brings the other button to front and unmasks the password character to the original text you we use backslash zero to unmask the characters now copy the code and paste it in the hide password button - we make little changes to the code for hiding the password you now go to the text box properties and type the asterisk symbol in the password character property now place the hide button behind and show button in the front inside the password field save the file and start the application now our login form is ready let us type in the username and password now let us check the show and hide buttons yes it is perfectly working that's it for the video if you like the design leave a like and do subscribe for more videos
Info
Channel: Scratch Code
Views: 13,762
Rating: 4.8691587 out of 5
Keywords: code screens, password field, show and hide, c sharp, c#, visual studio 2019, winforms, flat ui, 2020
Id: iD17cWr10Js
Channel Id: undefined
Length: 10min 33sec (633 seconds)
Published: Mon Apr 27 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.