disabling copy/paste/cut on shape shortcut menu 
Author Message
 disabling copy/paste/cut on shape shortcut menu

Hi,
how do I disable the copy, paste, cut (as well as other) commands on a
shape's shortcut menu?
I've added some Actions in the shapesheet, but I want to disable some
of the default commands...
TIA
JG


Fri, 15 Apr 2005 00:23:46 GMT  
 disabling copy/paste/cut on shape shortcut menu
Hi,

This section of code should do it.....

Dim visUIObj As Visio.UIObject
Dim visMenuSets As Visio.MenuSets, visMenuSet As
Visio.MenuSet
Dim visMenus As Visio.Menus, visMenu As Visio.Menu
Dim visMenuItems As Visio.MenuItems, visMenuItem As
Visio.MenuItem

Set visUIObj = Visio.Application.BuiltInMenus
Set visMenuSets = visUIObj.MenuSets

'get the contextmenu set for object selection
Set visMenuSet = visMenuSets.ItemAtID
(visUIObjSetCntx_DrawObjSel)
Set visMenus = visMenuSet.Menus
Set visMenu = visMenus(0)
Set visMenuItems = visMenu.MenuItems

'remove the Cut, Copy and Paste items
'check if there is a disable property

visMenuItems(1).Delete
visMenuItems(2).Delete
visMenuItems(0).Delete

'Set the menu modifications
Visio.Application.SetCustomMenus visUIObj

Regards,
Lakshmi.

Quote:
>-----Original Message-----
>Hi,
>how do I disable the copy, paste, cut (as well as other)
commands on a
>shape's shortcut menu?
>I've added some Actions in the shapesheet, but I want to
disable some
>of the default commands...
>TIA
>JG
>.



Sat, 16 Apr 2005 18:37:25 GMT  
 disabling copy/paste/cut on shape shortcut menu
Any way to disable the shortcut keys Ctrl-V, Ctrl-C, Ctrl-X, or will this do
it?


Quote:
> Hi,

> This section of code should do it.....

> Dim visUIObj As Visio.UIObject
> Dim visMenuSets As Visio.MenuSets, visMenuSet As
> Visio.MenuSet
> Dim visMenus As Visio.Menus, visMenu As Visio.Menu
> Dim visMenuItems As Visio.MenuItems, visMenuItem As
> Visio.MenuItem

> Set visUIObj = Visio.Application.BuiltInMenus
> Set visMenuSets = visUIObj.MenuSets

> 'get the contextmenu set for object selection
> Set visMenuSet = visMenuSets.ItemAtID
> (visUIObjSetCntx_DrawObjSel)
> Set visMenus = visMenuSet.Menus
> Set visMenu = visMenus(0)
> Set visMenuItems = visMenu.MenuItems

> 'remove the Cut, Copy and Paste items
> 'check if there is a disable property

> visMenuItems(1).Delete
> visMenuItems(2).Delete
> visMenuItems(0).Delete

> 'Set the menu modifications
> Visio.Application.SetCustomMenus visUIObj

> Regards,
> Lakshmi.
> >-----Original Message-----
> >Hi,
> >how do I disable the copy, paste, cut (as well as other)
> commands on a
> >shape's shortcut menu?
> >I've added some Actions in the shapesheet, but I want to
> disable some
> >of the default commands...
> >TIA
> >JG
> >.



Sun, 17 Apr 2005 15:38:24 GMT  
 disabling copy/paste/cut on shape shortcut menu

Quote:
>-----Original Message-----
>Any way to disable the shortcut keys Ctrl-V, Ctrl-C, Ctrl-
X, or will this do
>it?

For disabling the shortcut keys , you have to modify the
AccelTable. You can refer VISIOHOME\Docs\DVS.pdf Chapter
22 - Customising the Visio User Interface on how to do it.

-Lakshmi.

Quote:



>> Hi,

>> This section of code should do it.....

>> Dim visUIObj As Visio.UIObject
>> Dim visMenuSets As Visio.MenuSets, visMenuSet As
>> Visio.MenuSet
>> Dim visMenus As Visio.Menus, visMenu As Visio.Menu
>> Dim visMenuItems As Visio.MenuItems, visMenuItem As
>> Visio.MenuItem

>> Set visUIObj = Visio.Application.BuiltInMenus
>> Set visMenuSets = visUIObj.MenuSets

>> 'get the contextmenu set for object selection
>> Set visMenuSet = visMenuSets.ItemAtID
>> (visUIObjSetCntx_DrawObjSel)
>> Set visMenus = visMenuSet.Menus
>> Set visMenu = visMenus(0)
>> Set visMenuItems = visMenu.MenuItems

>> 'remove the Cut, Copy and Paste items
>> 'check if there is a disable property

>> visMenuItems(1).Delete
>> visMenuItems(2).Delete
>> visMenuItems(0).Delete

>> 'Set the menu modifications
>> Visio.Application.SetCustomMenus visUIObj

>> Regards,
>> Lakshmi.
>> >-----Original Message-----
>> >Hi,
>> >how do I disable the copy, paste, cut (as well as
other)
>> commands on a
>> >shape's shortcut menu?
>> >I've added some Actions in the shapesheet, but I want
to
>> disable some
>> >of the default commands...
>> >TIA
>> >JG
>> >.

>.



Mon, 25 Apr 2005 11:54:36 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Cut/Copy/Paste ShortCut menu for ListView control?

2. Disable TxtBox Copy/Cut/Paste Menu?

3. Enable/Disable of CUT, COPY, PASTE Menu's/Toolbars

4. Enable/Disable of CUT, COPY, PASTE Menu's/Toolbars

5. Enable/Disable of CUT, COPY, PASTE Menu's/Toolbars

6. RichTextBox: Bad Cut,Paste interactions with Menu Shortcuts Ctrl+X, Ctrl+Y

7. disabling cut/copy/paste

8. Disabling Copy Cut Paste

9. Enabling/Disabling Cut, Copy, Paste

10. Cut, Copy and Paste in the menu bar

11. Creating my own right-mouse-button cut-copy/paste menu

12. How to differentiate a shape created from Stencil drag/drop and shape Copy/Paste

 

 
Powered by phpBB® Forum Software