by Daniel S. Soper (9 Submissions)
Category: Custom Controls/Forms/Menus
Compatability: Visual Basic 3.0
Difficulty: Advanced
Date Added: Wed 3rd February 2021
Rating:
(3 Votes)

This code demonstrates how to add new menu items to a form's existing menu at runtime. It can be easily modified to add new menu items to other programs' menus as well.
Inputs
None.
Assumes
This is advanced Visual Basic code. If you modify this code without knowing what you are doing, it may have adverse effects on your system!
Code Returns
None.
Side Effects
None.
API DeclarationsThe following API's are used in this program:
GetMenu
GetSubMenu
GetMenuItemCount
InsertMenuItem
SetMenuItemInfo
SetWindowLong
CallWindowProc
Download How to add new menu items to a form's existing menu at runtime... (4 KB)
No comments have been posted about How to add new menu items to a form's existing menu at runtime.... Why not be the first to post a comment about How to add new menu items to a form's existing menu at runtime....