![]() |
Source Code |
![]() |
![]() |
1 | VB 5 Custom Controls |   |
NOTE:
this code has been superceded by the version at the new site.
|
  |
Adding menu icons to MDI projects with multiple child menus
Whenever the menu in the MDI form changes due to a new child form with its own menu being loaded, the IconMenu control will raise the NewMDIMenu event. At this stage you can inform the child form that the IconMenu control has detected that the menu has changed and it should set up all the items in the menu. The child form should respond by calling the SubClassMenu method and then setting up the icons it wants. When a child form with its own menu is unloaded, it should call the UnSubClassMenu method. This ensures that any extra menu items which were created by the child form are cleared up. If you don't create any new menu items whilst the child form is running, it won't matter whether you call this method. If you do, but fail to call it, the menus you have created will not be destroyed until the application ends. This would leads to a small (but ultimately disastrous if you left the project running long enough and kept opening and closing child forms) resource leak.
|
  |
NOTE:
this code has been superceded by the version at the new site.
|
![]() |
|
About Contribute Send Feedback Privacy
|