/// <summary> /// /// </summary> /// <param name="frm"></param> private void AddFormToPanelInterface(Form frm) { Frm_Tips frm_tips = new Frm_Tips(); frm_tips.Show(); Application.DoEvents(); this.panelInterface.Controls.Clear(); frm.FormBorderStyle = FormBorderStyle.None; frm.TopLevel = false; frm.Dock = DockStyle.Fill; //this.Width = frm.Width; //this.Height = this.Height + frm.Height - this.panelInterface.Height; //this.panelInterface.Height = frm.Height; this.panelInterface.Controls.Add(frm); this.lblFrmTitle.Text = string.Format("当前操作窗体:{0}", frm.Text.Trim()); this.StartPosition = FormStartPosition.CenterScreen; frm.Show(); frm_tips.Close(); }
/// <summary> /// /// </summary> /// <param name="msg"></param> public void DisplayTips(string msg) { try { if (this.FormTips == null || this.FormTips.IsDisposed) { this.FormTips = null; this.FormTips = new Frm_Tips(); } this.FormTips.StartPosition = FormStartPosition.CenterScreen; this.FormTips.WriteMsg(msg); this.FormTips.Show(); Application.DoEvents(); } catch { } }