PDA

Click to See Complete Forum and Search --> : How to show a popup menu?


Jhd.Honza
Jan 21st, 2000, 09:59 PM
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

rino_2
Jan 21st, 2000, 10:31 PM
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

DiGiTaIErRoR
Jan 21st, 2000, 10:34 PM
like this:
PopupMenu MenuName, flags, X, Y, Default

PopupMenu Form1.mnuFile, Command1.Left, Command1.Top + Command1.Height

have fun

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

Jhd.Honza
Jan 22nd, 2000, 03:11 AM
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.

MartinLiss
Jan 22nd, 2000, 06:05 AM
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?