logo
vbRad Home
Source Code
Book Reviews
Forum
Links
About Us
Contribute

Compare Databases with SQL Effects Clarity
 
 Create Popup Menus without a Form

Posted on
12/29/2003
Author:
Brian Yule
Email:
Not Shown
Applies To OS:
Windows
Product:
VB 5, 6



Download... the project. (12 kb)

In Visual Basic 2-6, we've been stuck with the same Menu Editor. If you want to popup a menu in your app, you have to define it first in the Menu Editor. But what if want to create a Popup menu on the fly? You are out of luck.

Brian Yule has created a well-modularized all API method for creating Popup menus at any time in your app. To bring up a menu you code is this simple:

    Set popupMenu = New BX_MNU.popupMenu

    Call popupMenu.AddStringMenuItem("One", 0)
    Call popupMenu.AddStringMenuItem("Two", 1)
    Call popupMenu.AddStringMenuItem("Three", 2)
    Call popupMenu.AddSeparatorMenuItem
    Call popupMenu.AddStringMenuItem("Four", 3)
    
    Call popupMenu.ShowPopupMenu

Download... the project. (12 kb)

To get in touch with the author of this example, email Brian Yule at BYule@braxtel.com


Add Your Comment  

Name: Email Address: all fields optional
Notify me via email when someone responds to this message (valid email required).

Enter the word:
 



Comments
#1. By Richard. Posted on 5/25/2006 11:33:16 AM
Hi Brian,
I'm trying to integrate your menufile builder into my app but am unable to compile the dlls due to a binary erorr. BX_MWA does not have a binary compatible file set. is the error. Any ideas?

Regards
Richard

#2. By Anonymous. Posted on 5/25/2006 4:57:01 PM
Richard,

In project properties for BX_MWA, set the binary compatibility and then compile just that project. After that you can easily recompile your entire project.

#3. By Asesh. Posted on 12/15/2006 6:56:53 PM
Hi Brian,
when I associated your menufile builder into my app, it shows the message "No creatable public components detected. Kindly help
Asesh

#4. By P.Masthanama. Posted on 1/12/2007 10:02:50 AM
I want to create a popup menus in visual basic,but the code for popup menus are not running what i have to do

#5. By MALIK. Posted on 12/20/2007 1:37:21 AM
W3LCOM3 TO DA $OUL R3AP3RS $IT3!

#6. By mohamed rafe. Posted on 8/30/2008 11:11:26 AM
How to create a popup menu in Microdoft visual basic 6.0, and display the popup menu with some software and use it in our application