void CreateBrushForm() { brushForm = new BrushForm(); brushForm.BrushChanged += brushForm_BrushChanged; brushForm.Shown += (s, e) => brushesToolStripMenuItem.Checked = true; brushForm.FormClosing += (s, e) => { e.Cancel = true; brushForm.Hide(); brushesToolStripMenuItem.Checked = false; }; }