|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Context MenusIs it possible to show different context menus by right clicking
on different areas of a picturebox f.e. ? An option is to build all the menus as subitems of the the main context menu and hide/unhide them with the visible method. Is there an other option on doing this? Thanks in advance, /\/ikos Am 25.03.2010 09:11, schrieb Nikos:
> Is it possible to show different context menus by right clicking ContextMenu or ContextMenuStrip?> on different areas of a picturebox f.e. ? > > An option is to build all the menus as subitems of the the main > context menu and hide/unhide them with the visible method. > Is there an other option on doing this? With ContextMenuStrip: Handle it's opening event: Private Sub ContextMenuStrip1_Opening(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) _ Handles ContextMenuStrip1.Opening Dim p = DirectCast(sender, ContextMenuStrip).SourceControl.PointToClient(Cursor.Position) 'Modify the ContextMenu here depending on p. End Sub Maybe there's already property in the ContextMenuStrip that reveals the position inside the SourceControl, but I couldn't find it. -- Armin
combobox
compiled on visual studio 2003 on windows XP, want to install on windows 7, error Can anyone recommend a print contol library please? Configure Properties of Windows User (Terminal Server Eviroment) issue of assigning a double variable in .net. Can be done? How to read commandtext after added parameters? Grid component. Localization in Crystal Reports VB Drag and Drop in DataGridView? |
|||||||||||||||||||||||