This video is about designing a text box which acts as a password field with show and hide options.
Source code:
using System;
using System.Windows.Forms;
namespace WindowsFormsApp1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void button3_Click(object sender, EventArgs e)
{
if(textBox2.PasswordChar=='*')
{
button4.BringToFront();
textBox2.PasswordChar = '\0';
}
}
private void button4_Click(object sender, EventArgs e)
{
if (textBox2.PasswordChar == '\0')
{
button4.BringToFront();
textBox2.PasswordChar = '*';
}
}
}
}
Like, Share and Subscribe for more videos.
For Icons used in this video --- icons8.com/app
#csharp #vs2019
26 апр 2020