pop up menus

Wizzy
05-27-2004, 09:33 AM
i'm curious what some of the different ways to create a popup menu are... so far it just seems to be a combobox... but i'm wondering if there's anyway to make a label or maybe a command button do a popup menu?

Teaboy
05-27-2004, 09:39 AM
You can create a popup menu on anything.


PopupMenu mnuName, , , mnuNameDefault


F2 is your friend :)

Wizzy
05-27-2004, 09:45 AM
i'll try to figure that out

i hit F2 and i have no idea what anything in that menu means.

Teaboy
05-27-2004, 09:48 AM
F2 opens the Object Browser thingie in VB. :D

Teaboy
05-27-2004, 09:51 AM
See Attached

Wizzy
05-27-2004, 09:55 AM
man am i ever confused. the sample makes sense, thanks - but what i don't get is where the menu comes from. All you had for code was

"PopupMenu mnuPopup, , , , yay"

but somehow it has all those options - but i didn't see them anywhere in the code :\ where did they come from?

Wizzy
05-27-2004, 10:03 AM
i think i figured it out

you simply made an actual menu - but made it so it wasn't Visible right? then the Menu As Object part is just the name of the menu... then the Default menu is what menu is automatically shows when it first comes up? is that right>?

Abdhul
05-27-2004, 10:25 AM
If you wan't to get real involved - and create a popup for anything, anywhere on your form, using either left or right or middle mouse button, use the API method.
If you don't have it, get the API guide from www.ALLAPI.net here:
http://www.mentalis.org/agnet/appdown.shtml
install the program and look for popup, it is a little bit of work to code, but well worth it. If you can't figure it out, let me know and I'll post a sample.

cerimar
05-27-2004, 10:28 AM
dont... you can call popupmenu anytime. and you can set x and y to anywhere. it has all functiality, as far as i know.
just use the events

Abdhul
05-27-2004, 10:33 AM
to each their own I suppose...

Teaboy
05-28-2004, 04:53 AM
i think i figured it out

you simply made an actual menu - but made it so it wasn't Visible right? then the Menu As Object part is just the name of the menu... then the Default menu is what menu is automatically shows when it first comes up? is that right>?
Yes :) Untick the parent menu's Visible checkbox to make it invisible.

'yay' was the name of the default menu, the one that comes up bold.
'mnuPopup' was the parent menu

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum