日期:2014-05-17 浏览次数:20928 次
//查询 if (w == null) { w = new wait(); w.LabelText = "正在查询,请稍候"; w.TopLevel = false; //将子窗体作为控件显示 w.TopMost = true; w.BringToFront(); w.Location = new System.Drawing.Point(dataGridView.Width / 2 - dataGridView.Location.X - w.Width / 2, dataGridView.Height / 2 - dataGridView.Location.Y);//将子窗体显示在主窗体中间位置, dataGridView.Controls.Add(w);//将子窗体的父容器设置为datagridview w.Show(); }
/// <summary> /// 关闭进度窗 /// </summary> void closewait() { if (w != null) { w.Close(); w.Dispose(); this.Focus(); } }
if (w== null || w.IsDisposed) { }