Annoying Context Menu bug in WinForms
by dan on Jun.12, 2007, under Development
Update: Wow, I’m really impressed with the response time of the triage team on Connect. They acknowledged the bug same day and are already looking into a resolution. That really is first class support. Thanks guys!
Just ran into a rather annoying bug in WinForms. You’ve got a ContextMenuStrip which is shared by a number of controls on your form. When the user right clicks one of the controls, and chooses an item in the context menu, the SourceControl property of the ContextMenuStrip is supposed to be set to the control that you right clicked on.
This works fine if you have a flat context menu, but if your context menu has sub-menus, and you click one of those items, then the SourceControl property is always null!
If this bug affects or annoys you, please vote for it here:
https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=282496
6 comments for this entry:
Trackbacks / Pingbacks
-
[...] Dan has submitted this bug to Microsoft, and they’ve recognised it as a bug. Thanks for your feedback. We have reproduced this bug on Visual Studio Codename Orcas Beta1, and we are sending this bug to the appropriate group within the Visual Studio Product Team for triage and resolution. [...]
August 14th, 2007 on 9:20 am
I wonder if you can add the funtion of “stroll back into the original Vista form” so that once we want to have the back start up screen, it will be ok if we didn’t make a backup. Thanks
April 17th, 2009 on 4:19 am
Can you add function of scroll back and when you are going to fix that bug for sub menus i would like to visit you after my 70-642 Configuring Windows Server 2008 Network Infrastructure exam about which i’m confident to pass in first attempt as i have already pass my 646-204 CSE Cisco Sales Expert exam along with the 350-030 CCIE Voice exam with useful training material and all i have done with high score as i will be free from all this i must visit you to see what new things you are discussing.
July 19th, 2009 on 7:52 am
Thanks for the information about the bug! Can the scroll back function into the original form of vista? Symtex are an expert database consultancy and development provider. We live, breath and eat Microsoft SQL Server and .Net programming day and night; really we love it and it’s that passion which keeps us at the top.
April 17th, 2010 on 1:34 pm
I’ve voted, but this bug has been resolved as fixed even though it is still there in VS2010. Is it ever likely to get fixed? I can’t use any of the workarounds as I’m writing a custom renderer and so don’t have access to the Opened event of any ContextMenuStrip that might use it. Guess I’ll have to have another rethink about how I’m going to workaround another MS bug that I have no chance to fix and it looks like MS have no interest in fixing.
July 21st, 2010 on 7:21 am
thank you.http://www.efox-shop.com/Can the scroll back function into the original form of vista?