o
k
q
u
e
s
t
i
o
n
s
.
c
o
m

Create a New Menu -

hi all
i used this code for create a new menu

Code:
Const MF_CHECKED = &H8&
Const MF_APPEND = &H100&
Const TPM_LEFTALIGN = &H0&
Const MF_DISABLED = &H2&
Const MF_GRAYED = &H1&
Const MF_SEPARATOR = &H800&
Const MF_STRING = &H0&
Private Type POINTAPI
    x As Long
    y As Long
End Type
Private Declare Function CreatePopupMenu Lib "user32" () As Long
Private Declare Function TrackPopupMenu Lib "user32" (ByVal hMenu As Long, ByVal wFlags As Long, ByVal x As Long, ByVal y As Long, ByVal nReserved As Long, ByVal hwnd As Long, ByVal lprc As Any) As Long
Private Declare Function GetSystemMenu Lib "user32" (ByVal hwnd As Long, ByVal bRevert As Long) As Long
Private Declare Function AppendMenu Lib "user32" Alias "AppendMenuA" (ByVal hMenu As Long, ByVal wFlags As Long, ByVal wIDNewItem As Long, ByVal lpNewItem As Any) As Long
Private Declare Function DestroyMenu Lib "user32" (ByVal hMenu As Long) As Long
Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
Dim hMenu As Long
Private Sub Form_Load()
    hMenu = CreatePopupMenu()
    AppendMenu hMenu, MF_STRING, ByVal 0&, "Menu A"
    AppendMenu hMenu, MF_GRAYED Or MF_DISABLED, ByVal 0&, "Menu B"
    AppendMenu hMenu, MF_SEPARATOR, ByVal 0&, ByVal 0&
    AppendMenu hMenu, MF_CHECKED, ByVal 0&, "Menu C"
End Sub
Private Sub Form_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
    Dim Pt As POINTAPI
    GetCursorPos Pt
    If Button = 1 Then
        TrackPopupMenu hMenu, TPM_LEFTALIGN, Pt.x, Pt.y, 0, Me.hwnd, ByVal 0&
    Else
        TrackPopupMenu GetSystemMenu(Me.hwnd, False), TPM_LEFTALIGN, Pt.x, Pt.y, 0, Me.hwnd, ByVal 0&
    End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
    DestroyMenu hMenu
End Sub
the question is how to make a msgbox appears on "Menu A" click
thanks

 

Create Menu For Menu! -
I did like to create a menu for conventional menu items (something like the menu that comes up when any Favorite menu item under the Favorites menu is right-clicked in IE). Can this be done?


Menu Problem -
I want to create my menu at runtime. I know how to duplicate an existance menu. BUT How can i create a menu with submenus at runtime. OR If i have 2 menus how can i convert one of then in submenu of the other one. OR There is some kind of ocx that alloy you create a runtim


Creating a right-click menu(resolved) -
Could someone explain or show code on how i show a menu when i right-click on an item in a listview? I was told to create a menu but keep it invisible but i already have a menu for the menu bar at the top so how do i create a second menu? Also, how do i get that menu to open up/hide


Runtime Menu/Right Click Menu/No border form -
Ok, I am trying to make a form as small as possible. I turned on the boreders and its just the way I want it. Now I would like create a popup menu (to save space, instead of puting command buttons). The problem is, when I add an invislbe menu in the menu editor and try to use Popupmenu


how to create a menu bar -
hey anybody here can help me on how to create a menu bar in a toolbar... ex. + File -> New, Open, Save + Edit -> Text, ...., ...., etc. + View -> ... + Window -> ... is it also possible create a menu bar dynamically? help here!!!!!!!!! tnx in adva


populating a pop up menu -
How can u create menu with items without the menu editor. I want to create a pop up menu from some records i read from a table? Thanks


How do you create a menu under a menu under a menu and so on.. Confused -
Ok right now im using a custom control to display my favorites in the menu at the top. I made the code but the control has a different way of featuring a fake menu at the top of the program that makes it easier to create sub items off of menu items. I want to know how would I go abou


replace menu with images (bitmaps) -
Hi, has anyone tried using Images to create a menu instead of the usual menu created through the menu editor? Im trying to do that now but I couldn't make it to function like a menu, like when the mouse pointer clicks on the form the menu should dissapear...


Pop-up menus -
In most of my applications i create custom title-bars, so to do this i set the border-style to 0. but when i want to make a pop-up menu, i have the menu set to invisible in the menu editor but it still has the grey menu bar along the top of my form, which completely ruins the appearanc


Custom Toolbar -
hey everyone, how do i create a custom toolbar that has a menu and items inside that menu via VBA in Excel? I tried to record a macro to see what it does, but that didnt work, not sure why.. so basically, i want VBA to create a toolbar and create a menu and create buttons insi


How to create in explorer's context menu my own entry -
I want to create a menu that will call my application from the explorer. I only want the menu to appear when i right click in a folder..how can i do this? Thanks


Would you like a menu -
I'm new to VB 6 (only about a week) and I would like to create my own favorites menu. I want to create one like in IE or Netscape but, I don't want to use IE's or Netscape's menus. Can anyone help me make a menu for my WebBrowser? I want to be able to make and add the .url fi


creating a pop-up menu -
how do i create a manual popupmenu? im working with shellnotifyicon, and it want a menu to pop up when i right click my shell icon(which i know how to do)...but my form isnt supposed to have any clipcontrols or controlbox...but if i makea menu using vb's built in menu maker...it makes


[2005] web.config -
[2005] ASP.net / vb.net Hey I'm trying to create a simple horizontal menu with 2 levels: (all the menu items are on the root level, except productA and productB which are under products) 1- home 2- products 2.a. productA 2.b. productC 3. contact us 1. problem is I can'


Pop-up Menu--Where should I create my menu -
Hi, I have a MDIform with some child forms. I wish to have a pop-up menu on the MSHFlexGrid in one of my child form. Then where should I create my menu....in the MDIform or the child form ? I encounter some problem when created the menu in child form, that is, when I run my


[2005] SetMenu, ModifyMenu, etc -
I want to set my menu, into an external application. I know you can do it using SetMenu, or something like it. The question is, can I create a menu and just make the menuitem a child of the external app? OR Is the only way to create the menu at runtime, and use callprocwindow or


Menu in a Coolbar!! GRRRR!!! -
Ok...the only thing I can come up with is to Create a Fake menu for the coolbar (or add the boring regular form menu...no!) Now I know I can add lables to the coolbar and on click add a popupmenu or whatever.... Now what I want to know is there a way to still make the mousemove w


Customizable menu -
I am currently redisigning the entire GUI part of my program SpeedEdit to allow a more individual setup of the program. My current project is the menus. Does anyone know how I can create the entire menu structure including multi-level childs at runtime?! I wish to allow the user


using images in menu -
Hi all, I'm working on a slide menu. I'm using the sliding_menu.js to create the menu and this works fine. Now I want to use gifs instead of the text displayed in the menu. Can anyone help me on this one.


Menu Handles persistency -
While loading a menu I need to create a datatable saving a value which I can use to uniqly identify the clicked menu whenever a menu Item is clicked. It seems that getting to the menu name is not as easy. I am wodering whether the Handle property will be unique and perisitent within a


Main Menu Trouble -
Dear all I am trying to build a main menu on run time, building a main menu with alot of menu item is still okay, but when I would like to make some events when I click the menu, problem arise. How can I create some click event if I don't know the name of the menu item, or perhap


Menus In A SDI Application -
Menus In A SDI Application I am creating a SDI application in VB. The User Interface is such, that I can't create a MDI application and have a common parent Menu, instead there has to be a Menu of each form of my SDI application. In VB, I am not able to do many things with Menu


Creating Sub-Sub-Menu of Ms Access -
Hey Guys, Im just little stuck on this... Could anly so kindly help me? Hi guys, How can I make a sub-sub menu in MS Access? I have "MAIN MENU" and under it is the submenu "My Menu" then under it is "Own Menu". How can I do to make a sub-sub-


Create menus dynamicly -
Can you do that ? I have a table in DB with that contain departments and I would to create a menu for each one and that menu should be place another menu. Is there another way than creating a bunch of menus and revealing them as needed ? Thanks


[02/03] Rotating Menu -
Hi, I am trying to create a menu purely with icons, that when you hover over them they show information and when you click, they show a specific form. I found something on the net, but i don't like the fact that it dissapears after a while and it will only show after the user cli


displaying variables in a menu -
I (finally) know how to create a "canned" menu using the menu editor but now I want to get fancy. I need a way to make some of the contents of the menu dynamic -- kind of like the MRU (most recently used) filenames that show up in a lot of applications' "File"


How can you create a form with borderstyle = none, and have a popup menu -
I went into menu editor to make my menu, set the top level to invisible, then had 3 options underneath. Then, I was going to popup the menu under Command1_Click using Me.popupmenu Me.MNU (mnu was its name - also, is this the right way of popping up a menu?) however, once i clicked


Strange Menu Problem -
OK, so I have a problem, I want to create a menu using VB Menu Editor, but then I want it to not be visible to the user but to be visible to Windows.. Let me explain a little more.... I have code that grabs the menu of the current window using API, but if I simply make the Visible pr


Create Dynamic Menu's at run time -
I'm in the process of writing a control that works like a button menu (like next to the forward / back buttons in IE5) and I want to be be able to create any menu at run time. (then use a popupmenu with a button) So far the closest I can get to dynamic menu's are first create the to


Menu used in several forms -
I want to create a menu used in several forms, example a popup menu include Edit,Copy,Paste,Delete items. Every form has its private sub to process menu selection. How can I do that


List Menu -
How do you create a list menu for the top of a form in vb6.0, like the file menu in a browser. Eg we need a drop down menu that maybe has a save, exit, new client links or something


Menu Bar at run time! -
Hi, Anyone knows how can I create a sub menu at Run time? I have a menu, but when a user checks a sub menu, I want tha a sub menu appears. Thanks,


need major help! -
sorry my brain is very very mush today - been working very hard for my coursework and still 3 to go im making an app that builds another program in another language basically i need to know how to make it so that when i ask the user how many menu items they wish to create, when t


Send Menu Subitem to a Class -
I have a Sub in a class that looks like this Public Sub ChangeCaption(mnu As Menu) This works as long as mnu is the highest level menu item, but I get a type mismatch error if I attempt to pass a menu subitem. What I want to be able to do is to create a generalized routine in


Task Tray Popup menu question -
VB6 Hi - I'm using pretty standard code to create a popup menu that shows when you click the task tray icon for my app. (ShellNotifyIcon, etc) However, I'm finding that if you activate the menu, and click anywhere else on the screen, the menu stays up. In fact, the only way t


Destroy Menu -
I am creating a popup menu from my systemtray icon and all is well except when the user clicks anywhere off of the menu to cancel it. The problem is that the menu stays up and does not get destroyed. Is there a way to destroy the menu when the user clicks off of it. I am subcla


Popup Menu on Usercontrol Pls help !!! -
Hi everyone How do I create a popup menu on usercontrol. In Usercontrol VB allows me to use Menu Editor to add a menu to Usercontrol. But when I call the menu as something like usually in the Form, Me.PopupMenu mnuMyFile I can't use Me. here can I ? Example would be great


Sidebar menu -
Does anyone know how to create a menu bar on the left side of a form like the ToolBox menu in .Net or like the side menu in Office XP?


Design Question. Masterpages -
Hi Guys, I am currently working on a site that will use a default masterpage. A section of this site will need to have a seperate sub menu. I dont want to have to update the sub menu on every page that uses it once I make a change. The only way that I can think of doing this is t


VB Menu -
How do I create a menu in VB similar to in IE wherein when I make a right mouse click the menu comes out? Is it a Form? How do I do this? Please help. Thanks.