Articles in this section
Category / Section

How to display the MiniToolBar and ContextMenu controls at the same time?

1 min read

Show MiniToolBar and ContextMenuStripEx

You can show the MiniToolBar and ContextMenuStripEx at the same by following the below steps.

1)Need to show the ContextMenuStripEx, on MouseDown event.

2)Need to update the visibility of MiniToolBar in required location.

3)Need to enable the visibility of the MiniToolBar, in “Opened” event in ContextMenuStripEx.


The following code example demonstrates the same.


void richTextBox1_MouseDown(object sender, MouseEventArgs e)
    //To show the context Menu
    //To hide the MiniToolBar
    this.miniToolBar1.Visible = false;
    //To show the MiniToolBar with specified location.
    this.miniToolBar1.Show(PointToScreen(e.Location), ToolStripDropDownDirection.AboveLeft);
void contextMenuStripEx1_Opened(object sender, EventArgs e)
    //To show the MiniToolBar
    this.miniToolBar1.Visible = true;


Private Sub richTextBox1_MouseDown(ByVal sender As Object, ByVal e As MouseEventArgs)
    'To show the context Menu
    'To hide the MiniToolBar
    Me.miniToolBar1.Visible = False
    'To show the MiniToolBar with specified location.
    Me.miniToolBar1.Show(PointToScreen(e.Location), ToolStripDropDownDirection.AboveLeft)
End Sub
Private Sub contextMenuStripEx1_Opened(ByVal sender As Object, ByVal e As EventArgs)
    'To show the MiniToolBar
    Me.miniToolBar1.Visible = True
End Sub

MiniToolBar and ContextMenuStripEx shows on same time

Figure 1. MiniToolBar and ContextMenuStripEx shows on same time.


C#: MiniToolBar_ContextMenuStripEx_C#

VB: MiniToolBar_ContextMenuStripEx_VB

Did you find this information helpful?
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied