首页上一页 1 下一页尾页 1 条记录 1/1页
还是那个c#的登陆窗体,帮我看下怎么不可以运行了
发表在C#图书答疑
2010-07-06
是否精华
是
否
版块置顶:
是
否
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace WindowsApplication3
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
if (TextBox.Text == "")
{
MessageBox.Show("不能空", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
else
{
if (textBox1.Text.ToLower() == "tsoft" && textBox2.Text.ToLower() == "tsoft")
{
MessageBox.Show("登陆成功!", "成功", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
else
{
MessageBox.Show("用户名或密码错误!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
}
private void button2_Click(object sender, EventArgs e)
{
textBox1.Text = textBox2.Text = "";
}
}
}
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace WindowsApplication3
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
if (TextBox.Text == "")
{
MessageBox.Show("不能空", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
else
{
if (textBox1.Text.ToLower() == "tsoft" && textBox2.Text.ToLower() == "tsoft")
{
MessageBox.Show("登陆成功!", "成功", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
else
{
MessageBox.Show("用户名或密码错误!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
}
private void button2_Click(object sender, EventArgs e)
{
textBox1.Text = textBox2.Text = "";
}
}
}