public void KillOrphaned() { _Timer.Enabled = false; Form lForm = new Form(); WindowManagement.SetParent(this.Handle, (int)(lForm.Handle)); System.Environment.Exit(0); }
private void _DisplayErrorLabel() { this._Page.PageTitle = _Page.PageTitle + " (" + RsViewEngine.Locale.GetTagText("error") + ")"; this.SuspendLayout(); _ErrorLabel = new Label(); _ErrorLabel.Name = "lErrorLabel"; _ErrorLabel.BackColor = Color.FromArgb(255, 255, 200, 200); _ErrorLabel.TextAlign = ContentAlignment.MiddleCenter; _ErrorLabel.Text = RsViewEngine.Locale.GetTagText("appCrashedNotify"); _ErrorLabel.BorderStyle = BorderStyle.FixedSingle; _ErrorLabel.Location = new Point(0, 0); _ErrorLabel.Size = new Size(this.ClientRectangle.Width, this.ClientRectangle.Height); _ErrorLabel.Font = RsViewEngine.TitleFont; _ErrorLabel.Anchor = (AnchorStyles)(AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Right | AnchorStyles.Bottom); this.Controls.Add(_ErrorLabel); _ErrorLabel.BringToFront(); this.ResumeLayout(); WindowManagement.SetParent(_ChildHandle, 0); }