Results 1 to 5 of 5

Thread: How to show a popup menu?

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 1999
    Location
    Prague, Czech Republic
    Posts
    350

    Post

    Hi everybody!

    I would like to show a popup menu when the user click by mouse. This is primitive. What about if my form has BorderStyle setted to 0 - None? I can make some menus, but the form become a border. Huh?



    ------------------
    Thanks,
    John, 14 years old

  2. #2
    Hyperactive Member
    Join Date
    Sep 1999
    Location
    Leeds, UK
    Posts
    287

    Post

    Hi,

    To make a popup menu simply create a menu first of all, you can if you like make the menu invisible. Let say that you wanted the menu to apper on the right click event of the form:

    ---------------
    Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    If Button = 2 thenMenuName.popupmenu
    End Sub

  3. #3
    So Unbanned DiGiTaIErRoR's Avatar
    Join Date
    Apr 1999
    Location
    /dev/null
    Posts
    4,111

    Post

    like this:
    PopupMenu MenuName, flags, X, Y, Default
    Code:
    PopupMenu Form1.mnuFile, Command1.Left, Command1.Top + Command1.Height
    have fun

    ------------------
    DiGiTaIErRoR

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 1999
    Location
    Prague, Czech Republic
    Posts
    350

    Post

    Thanks very much, but I need to leave the form WITHOUT any BORDER. If i create a menu (visible/invisible), form becomes a border!

    Here is the problem.

  5. #5
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Post

    I think then that the only thing you can do is to make your own "menu". Create a tiny form that looks like a menu item and put the same code behind the tiny form's Click event that you would have put in a real menu.

    ------------------
    Marty
    Can you buy an entire chess set in a pawn shop?

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