Re: VB's Menu's

Tech-Archive recommends: Fix windows errors by optimizing your registry




"Siegfried" <siegfried@xxxxxxx> wrote in message
news:OLAIw1rIGHA.1876@xxxxxxxxxxxxxxxxxxxxxxx
> I'm having a system which is letting the user define the structures of the
> menus (since all menu-alternatives is filenames), I need to be able to
> create both menu-items and sub-menus at runtime.
> I have installed Advanced Menus 0.8 (or something like that), but it only
> allows changing of the appearance, not more runtime compability.
>
> So if the user defines the menu as
> 1
> |-2
> | |-4
> |
> |-5
> | |-6
> | |
> | |-7
> |
> |-3
>
>
> this looks pretty much as a treeview, and then I want the program to
> create this structural system with menus and submenus
> however, since you cant use Form.Controls.Add("VB.Menu") I figured I have
> to use apicalls to create the menu.

Okay. I get it. Yes you have to use the API. You will also need to create
your own menubar. Have you tried reading about the various calls in MSDN?
You can likely find VB examples in there or elsewhere. In short, you use a
toolbar for the faux menubar. You call TrackPopupMenu for the appropriate
menu from the toolbar's button click event.

>> "Siegfried" <siegfried@xxxxxxx> wrote in message
>> news:uk4KWvqIGHA.2708@xxxxxxxxxxxxxxxxxxxxxxx
>>
>>>Is there anyone here that knows how to build a popup-menu from scratch
>>>using the API-calls from WinUser.dll?
>>>
>>>eg. CreateMenu and InsertMenuItem.
>>>
>>>Since VB by default not support changing of the Menu-items previous
>>>object, I figured this would be the only way (If I dont wanna pay for a
>>
>>
>> Changing of the what? What is it that you are trying to do?
>>
>>
>>>expencive menu tool)
>>
>>

.


Quantcast