I have toolStrip Control, and it has few items like toolstripButton, ToolStripDropDown button.
For ToolStripDropDownButton i am not creating any dropDown list, instead i am using contextmenu with few items.
Whenever mouseHover to this toolstripdropdownbutton i show this contextmenu.
here is sample code
private void toolStripDropDownButtonOpen_MouseHover(object sender, EventArgs e)
{
ToolStripDropDownButton btnSender = (ToolStripDropDownButton)sender;
Point ptLowerRight = new Point(btnSender.Bounds.Right - 95, btnSender.Bounds.Bottom + 16);
ptLowerRight = PointToScreen(ptLowerRight);
contextMenuStrip.Show(ptLowerRight);
}
I want whenever i loose focus on toolStripButtonDropDown that time this contextMenu should be closed. I have used mouseleave event for this but its not working properly.
Any help will be appreciated.
Thanks in advanced