A-S*_*ani 5 c# vspackage visual-studio envdte
我为我的创建了一个自定义输出窗格VSPackage:

使用此代码:
// 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();
Run Code Online (Sandbox Code Playgroud)
问题
当当前选择了其他选项卡时,如何选择“输出”选项卡?
要激活(聚焦)Visual Studio 的输出窗口:
DTE dte = (DTE)GetService(typeof(DTE));
Window window = dte.Windows.Item(EnvDTE.Constants.vsWindowKindOutput);
window.Activate();
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2254 次 |
| 最近记录: |