TabControl Context Menu
问题 In a Windows Forms app I set the ContextMenuStrip property on a TabControl. How can I tell the user clicked a tab other then the one that is currently selected? How can I restrict the context menu from showing only when the top Tab portion with the label is clicked, and not elsewhere in the tab? 回答1: Don't bother setting the contextMenuStrip property on the TabControl. Rather do it this way. Hook up to the tabControl's MouseClick event, and then manually show the context menu. This will only