private void button_MouseLeave(object sender, EventArgs e) { ToolStripButton button = sender as ToolStripButton; AutoResizeControl control = _mapButtonToControl[button]; if (control.Visible) { control.StartTrackMouse(); } }
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(); } }