PackageUtility.ShowMessageBox 方法 (IServiceProvider, String, OLEMSGBUTTON, OLEMSGDEFBUTTON, OLEMSGICON)
若要顯示訊息方塊中的,命令介面內的 helper 方法。
命名空間: Microsoft.VisualStudio.Modeling.Shell
組件: Microsoft.VisualStudio.Modeling.Sdk.Shell.11.0 (在 Microsoft.VisualStudio.Modeling.Sdk.Shell.11.0.dll 中)
語法
'宣告
Public Shared Function ShowMessageBox ( _
serviceProvider As IServiceProvider, _
messageText As String, _
messageButtons As OLEMSGBUTTON, _
defaultButton As OLEMSGDEFBUTTON, _
messageIcon As OLEMSGICON _
) As DialogResult
public static DialogResult ShowMessageBox(
IServiceProvider serviceProvider,
string messageText,
OLEMSGBUTTON messageButtons,
OLEMSGDEFBUTTON defaultButton,
OLEMSGICON messageIcon
)
參數
- serviceProvider
型別:System.IServiceProvider
- messageText
型別:System.String
若要顯示的文字。
- messageButtons
型別:Microsoft.VisualStudio.Shell.Interop.OLEMSGBUTTON
應該會出現在對話方塊中的按鈕。
- defaultButton
型別:Microsoft.VisualStudio.Shell.Interop.OLEMSGDEFBUTTON
(當使用者按下傳回叫用) 的預設按鈕。
- messageIcon
型別:Microsoft.VisualStudio.Shell.Interop.OLEMSGICON
(警告、 錯誤,資訊、 等),若要顯示的圖示
傳回值
型別:System.Windows.Forms.DialogResult
.NET Framework 安全性
- 完全信任立即呼叫者。這個成員無法供部分信任的程式碼使用。如需詳細資訊,請參閱從部分受信任程式碼使用程式庫。