private void button_Click(object sender, EventArgs e) { ToolStripButton button = sender as ToolStripButton; AutoResizeControl control = _mapButtonToControl[button]; if (!control.Showing) { control.Show(false); control.BringToFront(); control.Focus(); control.StartTrackMouse(); } }
private void button_MouseHover(object sender, EventArgs e) { ToolStripButton button = sender as ToolStripButton; AutoResizeControl control = _mapButtonToControl[button]; if (!control.Visible && !control.Showing) { control.BringToFront(); foreach (Control child in Parent.Controls) { if (child is MenuStrip) { control.BringToFront(); } } control.Show(true); } }