如何在Visual Studio菜单项上注册鼠标悬停事件?

时间:2022-06-01 19:03:01

I'm writing VSIX plugin. I've created an icon on Visual Studio standard toolbar. My custom command is attached to it:

我写VSIX插件。我在Visual Studio标准工具栏上创建了一个图标。我的自定义命令附在上面:

var mcs = GetService(typeof(IMenuCommandService)) as OleMenuCommandService;
var commandId = new CommandID(GuidList.guidSthCmdSet, PkgCmdIDList.cmdidSth);
command = new OleMenuCommand(DoSomething, commandId);
mcs.AddCommand(command);  

If I click on this icon, the DoSomething function invokes. What I need to do now is to run other function, while the cursor of my mouse is over the toolbar icon. How to do this ?

如果我点击这个图标,DoSomething函数会调用。我现在需要做的是运行其他函数,而鼠标光标在工具栏图标上。怎么做呢?

1 个解决方案

#1


0  

I would say, this is not possible...

我想说,这是不可能的……

#1


0  

I would say, this is not possible...

我想说,这是不可能的……