Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > General > pop up menus


Reply
 
Thread Tools Display Modes
  #1  
Old 05-27-2004, 09:33 AM
Wizzy Wizzy is offline
Centurion
 
Join Date: Dec 2003
Posts: 131
Default pop up menus


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?
Reply With Quote
  #2  
Old 05-27-2004, 09:39 AM
Teaboy's Avatar
Teaboy Teaboy is offline
Centurion
 
Join Date: Oct 2003
Location: London, England.
Posts: 151
Default

You can create a popup menu on anything.

Code:
PopupMenu mnuName, , , mnuNameDefault

F2 is your friend
Reply With Quote
  #3  
Old 05-27-2004, 09:45 AM
Wizzy Wizzy is offline
Centurion
 
Join Date: Dec 2003
Posts: 131
Default

i'll try to figure that out

i hit F2 and i have no idea what anything in that menu means.
Reply With Quote
  #4  
Old 05-27-2004, 09:48 AM
Teaboy's Avatar
Teaboy Teaboy is offline
Centurion
 
Join Date: Oct 2003
Location: London, England.
Posts: 151
Default

F2 opens the Object Browser thingie in VB.
Reply With Quote
  #5  
Old 05-27-2004, 09:51 AM
Teaboy's Avatar
Teaboy Teaboy is offline
Centurion
 
Join Date: Oct 2003
Location: London, England.
Posts: 151
Default

See Attached
Attached Files
File Type: zip Form1.zip (694 Bytes, 21 views)
Reply With Quote
  #6  
Old 05-27-2004, 09:55 AM
Wizzy Wizzy is offline
Centurion
 
Join Date: Dec 2003
Posts: 131
Default

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?
Reply With Quote
  #7  
Old 05-27-2004, 10:03 AM
Wizzy Wizzy is offline
Centurion
 
Join Date: Dec 2003
Posts: 131
Default

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>?
Reply With Quote
  #8  
Old 05-27-2004, 10:25 AM
Abdhul's Avatar
Abdhul Abdhul is offline
Centurion
 
Join Date: Apr 2004
Posts: 181
Default

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.
__________________
If you build a man a fire, you warm him for a day.
If you set a man on fire, you warm him for the rest of his life.
Reply With Quote
  #9  
Old 05-27-2004, 10:28 AM
cerimar cerimar is offline
Banned
 
Join Date: May 2004
Posts: 37
Default

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
Reply With Quote
  #10  
Old 05-27-2004, 10:33 AM
Abdhul's Avatar
Abdhul Abdhul is offline
Centurion
 
Join Date: Apr 2004
Posts: 181
Default

to each their own I suppose...
__________________
If you build a man a fire, you warm him for a day.
If you set a man on fire, you warm him for the rest of his life.
Reply With Quote
  #11  
Old 05-28-2004, 04:53 AM
Teaboy's Avatar
Teaboy Teaboy is offline
Centurion
 
Join Date: Oct 2003
Location: London, England.
Posts: 151
Default

Quote:
Originally Posted by Wizzy
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
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Disabled Menus Affecting Timers Ed Ferner General 4 04-07-2004 01:49 PM
menus, menus, menus... the_manic_mouse General 2 09-18-2003 03:52 PM
How do I hide all menus? holming Excel 4 06-29-2003 08:07 PM
Menus on bottom of custom titlebar. Agent Interface and Graphics 7 05-31-2002 05:29 PM

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->