收集了vs.net的IDE中的ComandBars的名称

为vs.net写addin时,添加菜单的代码一般如下
//添加到工具栏
CommandBar commandBar = (CommandBar)commandBars["Tools"];
CommandBarControl commandBarControl = command.AddControl(commandBar, 1);

那么这个"commandBars["Tools"]"中的除了Tools还有哪些呢?下载以下文件就清楚了,当然这是我IDE的环境,可能与大家有一些差异。

下载CommandBars列表

到了VS2005重新整理了一份
下载带中文提示的CommandBars列表

// AllCommandBar
Microsoft.VisualStudio.CommandBars.CommandBars bars  =  (Microsoft.VisualStudio.CommandBars.CommandBars)_applicationObject.CommandBars;

// 项目的右键快捷菜单
Microsoft.VisualStudio.CommandBars.CommandBar menuBarProjectBar  =  bars[ " Project " ];


// 准备命令:
Command command  =  commands.AddNamedCommand2(_addInInstance,  " NHFrogWizard " " NHFrogWizard " " Executes the command for NHFrogWizard " true 59 ref  contextGUIDS, ( int )vsCommandStatus.vsCommandStatusSupported + ( int )vsCommandStatus.vsCommandStatusEnabled, ( int )vsCommandStyle.vsCommandStylePictAndText, vsCommandControlType.vsCommandControlTypeButton);

// 加入到项目右键的快捷菜单
if  ((command  !=   null &&  (menuBarProjectBar  !=   null ))
    command.AddControl(menuBarProjectBar, 
1 );

转载于:https://www.cnblogs.com/kevin-Y/archive/2006/06/27/437055.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值