Namespace: Microsoft.VisualStudio.Modeling.Shell
Assembly: Microsoft.VisualStudio.Modeling.Sdk.Shell (in Microsoft.VisualStudio.Modeling.Sdk.Shell.dll)
Syntax
'宣言
Public Shared Function ShowMessageBox ( _
serviceProvider As IServiceProvider, _
messageText As String, _
f1Keyword As String, _
messageButtons As OLEMSGBUTTON, _
defaultButton As OLEMSGDEFBUTTON, _
messageIcon As OLEMSGICON _
) As DialogResult
'使用
Dim serviceProvider As IServiceProvider
Dim messageText As String
Dim f1Keyword As String
Dim messageButtons As OLEMSGBUTTON
Dim defaultButton As OLEMSGDEFBUTTON
Dim messageIcon As OLEMSGICON
Dim returnValue As DialogResult
returnValue = PackageUtility.ShowMessageBox(serviceProvider, _
messageText, f1Keyword, messageButtons, _
defaultButton, messageIcon)
public static DialogResult ShowMessageBox(
IServiceProvider serviceProvider,
string messageText,
string f1Keyword,
OLEMSGBUTTON messageButtons,
OLEMSGDEFBUTTON defaultButton,
OLEMSGICON messageIcon
)
public:
static DialogResult ShowMessageBox(
IServiceProvider^ serviceProvider,
String^ messageText,
String^ f1Keyword,
OLEMSGBUTTON messageButtons,
OLEMSGDEFBUTTON defaultButton,
OLEMSGICON messageIcon
)
public static function ShowMessageBox(
serviceProvider : IServiceProvider,
messageText : String,
f1Keyword : String,
messageButtons : OLEMSGBUTTON,
defaultButton : OLEMSGDEFBUTTON,
messageIcon : OLEMSGICON
) : DialogResult
Parameters
- serviceProvider
Type: System.IServiceProvider
- messageText
Type: System.String
- f1Keyword
Type: System.String
- messageButtons
Type: Microsoft.VisualStudio.Shell.Interop.OLEMSGBUTTON
- defaultButton
Type: Microsoft.VisualStudio.Shell.Interop.OLEMSGDEFBUTTON
- messageIcon
Type: Microsoft.VisualStudio.Shell.Interop.OLEMSGICON
Return Value
Type: System.Windows.Forms.DialogResult
Permissions
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.