我为我的 VSPackage
创建了一个自定义输出窗口 Pane :
使用此代码:
// Creating Output Window for our package.
IVsOutputWindow output = GetService(typeof(SVsOutputWindow)) as IVsOutputWindow;
Guid guildGeneral = Microsoft.VisualStudio.VSConstants.OutputWindowPaneGuid.GeneralPane_guid;
int hr = output.CreatePane(guildGeneral, "Codex", 1, 0);
hr = output.GetPane(guildGeneral, out ApplicationConstants.pane);
ApplicationConstants.pane.Activate();
问题
当前选择其他选项卡时,如何选择“输出”选项卡?
最佳答案
在 Visual Studio 的输出窗口上激活(聚焦):
DTE dte = (DTE)GetService(typeof(DTE));
Window window = dte.Windows.Item(EnvDTE.Constants.vsWindowKindOutput);
window.Activate();
关于c# - 使用 DTE 激活 Visual Studio 的输出窗口,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31125153/