Pregunta

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?

¿Fue útil?

Solución

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.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top