December 1999
Intermediate to advanced
480 pages
11h 5m
English
Here is a skeleton code framework for modifying existing menus:
Public Sub MakeWeeChange()
Dim UIObj As Visio.UIObject
Set UIObj = Visio.Application.BuiltInMenus
' <make modifications>
Visio.Application.SetCustomMenus UIObj
End Sub
It is important that you do not forget to use the SetCustomMenus method of the application object. Failing to do so will fail to activate your changes.
Listing 19.1 is a full code example of adding a “demo” menu to the existing menu sets for the current diagram. The menu item runs a VB add-on called DispName.EXE.
Sub AddAWeeDemoMenu() Dim appVisio As Visio.Application Dim UIObj As Visio.UIObject 'Contains the UI object Dim menuSetsObj As Visio.MenuSets ... |
Read now
Unlock full access