Tuesday, January 6, 2009

How to create a Left-Click Context Menu that looks like its a drop-down list on a button

Copy and paste the code from the post just below this.  The key part is the function below.  When you click on the button, you want the ContextMenu to show up below the button making it appear that it is drop-down list.

  Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Me.ContextMenuStrip1.Show(Button1, New Point(0, Button1.Height))
  End Sub

No comments: