Is there a way for a VS Package/Extension to get the VisualStudio main UI thread in any way during runtime? Equally, is it possible to get the Handle for it, for example to display a message box with the proper Parent/Owner being set?

有帮助吗?

解决方案

To answer my own Question - there's a Microsoft.VisualStudio.Shell.ThreadHelper class that provides access to the VS UI thread and for the handle, one can use the IVsUIShell.GetDialogOwnerHwnd() helper method.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top