문제

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