Question

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?

Était-ce utile?

La solution

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.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top