Click here to Skip to main content
14,207,050 members
Rate this:
 
Please Sign up or sign in to vote.
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
Posted
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Cookies | Terms of Service
Web05 | 2.8.190612.1 | Last Updated 4 Apr 2014
Copyright © CodeProject, 1999-2019
All Rights Reserved.
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100