using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace LogIn_Application
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
password.PasswordChar = '*';
}
private void login_Click(object sender, EventArgs e)
{
if (username.Text == "charlie" & password.Text == "password")
{
//if user and password correct
MessageBox.Show("User Login Correct!", "Welocome User!");
//if the user login correct change the page
Second_Page page = new Second_Page();
page.Show();
this.Hide();
}
//if user login incorrect
else
{
MessageBox.Show("Sorry Incorrect User Login!", "Warning");
password.Text = "";
username.Text = "";
}
}
private void cancel_Click(object sender, EventArgs e)
{
this.Close();
}
}
}
Watch video Visual Studio Creating User Login, Using TextBox, Button, and changing Windows Form online without registration, duration hours minute second in high quality. This video was added by user Charlie Cabreros 19 August 2019, don't forget to share it with your friends and acquaintances, it has been viewed on our site 7,421 once and liked it 60 people.