2006-04-07 14:05
2006-04-08 08:09
2006-04-08 08:15
2006-04-08 08:18
2006-04-08 10:04
你看看这个可能对你有帮助
if(textBox1.Text.IndexOf("-")!=0)
{
if(textBox1.Text.IndexOf("-")>=0)
{
MessageBox.Show("错误","jksjdf",MessageBoxButtons.OKCancel,MessageBoxIcon.Exclamation);
if(DialogResult==DialogResult.OK)
{
this.Close();
}
}
}
if(textBox1.Text.IndexOf("-")==0)
{
string aa=textBox1.Text.ToString();
if(textBox1.Text.IndexOf(".")==1)
{
MessageBox.Show("错误","提示",MessageBoxButtons.OKCancel,MessageBoxIcon.Exclamation);
if(DialogResult==DialogResult.OK)
{
this.Close();
}
}
if(textBox1.Text.IndexOf("-",1,textBox1.Text.Length-1)>=0)
{
MessageBox.Show("错误","提示"MessageBoxButtons.OKCancel,MessageBoxIcon.Exclamation);
if(DialogResult==DialogResult.OK)
{
this.Close();
}
}
}

2006-04-08 10:12
2006-04-08 13:03
2006-04-08 13:43
2006-04-08 16:02
2006-04-08 16:10