1) 综合运用label,button, textbox控件,设计密码登陆界面并调试其程序(可思考:如果用户名或者密码输错三次,自动退出,则程序代码如何编写)。示例图如下.
主要程序:
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 WindowsFormsApplication3
{
public partial class Form1 : Form
{
public static int number=0;
public Form1()
{
InitializeComponent();
}
private void button3_Click(object sender, EventArgs e)
{
this.Close();
}
private void button2_Click(object sender, EventArgs e)
{
textBox1.Text = "";
textBox2.Text = "";
textBox1.Focus();
}
private void button1_Click(object sender, EventArgs e)
{