try
{
if (this.txtName.Text == "")
{
    this.lblConnView.Text = "请输入姓名!";
    this.txtName.Focus();
    return;
}//Pass the filepath and filename to the StreamWriter Constructor
StreamWriter sw = new StreamWriter(Application.StartupPath + @"/ip.txt");//Write a line of text
sw.WriteLine(this.txtName.Text.Trim());//Close the file
sw.Close();MessageBox.show("成功");
}
catch(Exception ex)
{
     throw ex;
}为什么这两处的MessageBox都不能用了,我点这个按钮事件就系统就很慢,响应半天没反应没分了,大家照顾一家新手吧