初学C#,有到题想问一下。

来源:百度知道 编辑:UC知道 时间:2024/06/06 17:07:24
编写一个简单的登入程序,界面上有两个输入框,和一个按钮,输入框分别是ID和密码的,假设ID为123,密码为abc;按钮为“登入”,当单击登入时ID密码正确则提示登入成功,错误为密码或ID错误。请高手指教,无限感谢

using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;

namespace WindowsApplication4
{
/// <summary>
/// Summary description for Form1.
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;

public Form1()
{
//
// Required for Windows Form Designer support
/