实验要求:利用基本的控件,设计一个简单的登录界面,并且对密码经行验证。
啥也别说,咱上代码!
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 test5
{
public partial class Form11 : Form
{
string name, password;
public Form11()
{
InitializeComponent();
}
private void Form11_Load(object sender, EventArgs e)
{
this.Text = "烟台大学网络教学平台登录";
this.label1.Text = "学号:";
this.label2.Text = "密码:";
this.button1.Text = "登录";
this.textBox1.MaxLength = 12;
this.textBox2.PasswordChar = '*';
this.checkBox1.Text = "记住密码";
}
private void textBox1_TextChan