在方法内建Form,响应不行...........
private void PostFireWallAddButton_Click(object sender, EventArgs e)
{
XmlManage xm = new XmlManage(XmlManage.PostConfigXmlFile);
Form f = new Form();
Label fl=new Label();
fl.Text= "正在验证数据是否有效,请稍后... ";
fl.Font = new Font( "宋体 ", 12);
fl.Width = 280;
fl.Location=new Point(50,50);
f.FormBorderStyle = FormBorderStyle.FixedDialog;
f.MaximizeBox = false;
f.MinimizeBox = false;
f.Controls.Add(fl);
f.Size = new Size(300, 130);
f.StartPosition = FormStartPosition.CenterParent;
f.ShowInTaskbar = false;
f.ResumeLayout(true);
f.Show(this);
PostConfig pc = new PostConfig(textBoxURL.Text, textBoxUserName.Text, textBoxPassword.Text);
pc.login();
if (!pc.IsValid)
{
//MessageBox.Show( "您的输入无效,请重新输入! ");
fl.Text= "您的输入无效,请重新输入! ";
return;
}
fl.Text = "验证数据有效,正在退出验证... ";