public bool BringToFront() { try { this.Show(); this.Topmost = true; this.Topmost = false; return true; } catch (InvalidOperationException) { // This happens if the window is closing when this method is called return false; } }