private void Form11_Load(object sender, EventArgs e)
{
GetCode();
}
private void button1_Click(object sender, EventArgs e)
{
if (textBox1.Text != null && textBox1.Text != "")
{
if (textBox1.Text == label1.Text)
{
MessageBox.Show("验证成功!");
}
else
{
MessageBox.Show("验证码错误!");
}
}
else
{
MessageBox.Show("请输入验证码!");
}
}
public void GetCode()
{
//Random r = new Random();
//label1.Text = r.Next(1000,10000).ToString();
string vc = "";
Random r = new Random();