C#中WinForm窗体的问题。
我在form1中调用form2 ,form2中弹出对话框后 确定后 form2也消失了,返回到form1 我不想返回form1
只是退出form2中的一个过程 在vb中用Exit Sub 在C#中用???
我试过用return不行。
代码如下:
private void button1_Click(object sender, System.EventArgs e)
{
string returnstr=check_login(textBox1.Text,textBox2.Text);
if(returnstr!=null)
{
MessageBox.Show(returnstr,"警告信息:",System.Windows.Forms.MessageBoxButtons.OK,System.Windows.Forms.MessageBoxIcon.Error);
}
else
{
this.Hide();
}
}