វាគ្រាន់់ជាផ្នែកមូយនៃ System ដើម្បីការពារ Security បានមួយកម្រិត៖
make form C# language to Login form to system
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 LOGIN1 { public partial class Form1 : Form { string username = "ChanKuoch"; string password = "12345"; public Form1() { InitializeComponent(); } private void btnLogin_Click(object sender, EventArgs e) { if (txtUsername.Text == username) { if (txtPassword.Text == password) { MessageBox.Show("You Successful to Login!"); } else { MessageBox.Show("Please try Again you are Incorrect!"); } } } private void btnRegister_Click(object sender, EventArgs e) { username = txtUsername.Text; password = txtPassword.Text; MessageBox.Show("RSGISTED!"); } } }
Post a Comment