Previous
Next
Here i will explain how we do password protection using code.
Step(1) :- Create a login Form
First create a Login form as i shown you in Tutorial 2
Step (2) :- Coding
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace First_Csharp_app
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
pass_txt.passwordChar = '$'; //without this you can also do it by text box property as password
}
private void button1_Click(object sender, EventArgs e)
{
//Coding
}
Step (3) :- Output
Previous
Next
No comments:
Post a Comment