[英]Visual Studio Addin - automated right mouse click
Is there any way that I can make my addin press the right mouse button and then select one option from the opened context menu? 有什么方法可以使外接程序按鼠标右键,然后从打开的上下文菜单中选择一个选项?
Something like this: 像这样:
_applicationObject.Windows.Item(EnvDTE.Constants.vsWindowKindSolutionExplorer).Activate();
_applicationObject.ToolWindows.SolutionExplorer.GetItem(projectName).Select(vsUISelectionType.vsUISelectionTypeSelect);
_applicationObject.ExecuteCommand("PRESS RIGHT MOUSE BUTTON");
_applicationObject.ExecuteCommand("CLICK OPTION XPTO FROM CONTECT MENU");
遵循@Adriano Repetti的建议,发现了这一点
_applicationObject.ExecuteCommand("ClassViewContextMenus.ClassViewProject.Rebuild");
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.