Results 1 to 4 of 4

Thread: pop-up menu *[RESOLVED]*

  1. #1

    Thread Starter
    Hyperactive Member RealNickyDude's Avatar
    Join Date
    Nov 2002
    Location
    Watching you through the hidden camera :o
    Posts
    435

    Thumbs up pop-up menu *[RESOLVED]*

    How do I have a pop-up menu after i've clicked a button with the left mousebutton?

    I imagine its a ContextMenu, but how do I show it?
    Last edited by RealNickyDude; Feb 19th, 2003 at 07:54 AM.
    [vbcode]
    On Error GoTo Hell
    [/vbcode]:¬) Nicky : Why not try VBCodebook.NET.

  2. #2

    Thread Starter
    Hyperactive Member RealNickyDude's Avatar
    Join Date
    Nov 2002
    Location
    Watching you through the hidden camera :o
    Posts
    435
    Ok, i've managed to figure out this:

    VB Code:
    1. SearchContextMenu.Show(Me, btnSearchMenu.MousePosition)
    but the menu is showing about 2 inches below where i've clicked the mouse on the button.

    How do I get it so its just below and to the right, like a normal context menu?
    [vbcode]
    On Error GoTo Hell
    [/vbcode]:¬) Nicky : Why not try VBCodebook.NET.

  3. #3
    Frenzied Member
    Join Date
    Oct 2002
    Location
    Gammapolis
    Posts
    1,474
    VB Code:
    1. Private Sub Button1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Button1.MouseDown
    2.         If e.Button = MouseButtons.Left Then
    3.             Dim pp As Point = New Point(e.X, e.Y)
    4.             ContextMenu1.Show(Button1, pp)
    5.         End If
    6.     End Sub

  4. #4

    Thread Starter
    Hyperactive Member RealNickyDude's Avatar
    Join Date
    Nov 2002
    Location
    Watching you through the hidden camera :o
    Posts
    435
    Thanks
    [vbcode]
    On Error GoTo Hell
    [/vbcode]:¬) Nicky : Why not try VBCodebook.NET.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width