IUIService.ShowMessage Méthode

Définition

Affiche le message spécifié dans une boîte de message.

Surcharges

Nom Description
ShowMessage(String)

Affiche le message spécifié dans une boîte de message.

ShowMessage(String, String)

Affiche le message spécifié dans une zone de message avec la légende spécifiée.

ShowMessage(String, String, MessageBoxButtons)

Affiche le message spécifié dans une boîte de message avec la légende et les boutons spécifiés à placer dans la boîte de dialogue.

ShowMessage(String)

Source:
IUIService.cs
Source:
IUIService.cs
Source:
IUIService.cs
Source:
IUIService.cs
Source:
IUIService.cs

Affiche le message spécifié dans une boîte de message.

public:
 void ShowMessage(System::String ^ message);
public void ShowMessage(string message);
abstract member ShowMessage : string -> unit
Public Sub ShowMessage (message As String)

Paramètres

message
String

Le message à afficher.

Exemples

L’exemple de code suivant montre comment utiliser la ShowMessage méthode pour afficher une boîte de message.

IUIService^ UIservice = dynamic_cast<IUIService^>(this->GetService( System::Windows::Forms::Design::IUIService::typeid ));
if ( UIservice != nullptr )
      UIservice->ShowMessage( "Test message", "Test caption", System::Windows::Forms::MessageBoxButtons::AbortRetryIgnore );
IUIService UIservice = (IUIService)this.GetService( 
    typeof( System.Windows.Forms.Design.IUIService ) );
if( UIservice != null )            
    UIservice.ShowMessage("Test message", "Test caption", 
        System.Windows.Forms.MessageBoxButtons.AbortRetryIgnore);
Dim UIservice As IUIService = CType(Me.GetService( _
    GetType(System.Windows.Forms.Design.IUIService)), IUIService)
If (UIservice IsNot Nothing) Then
    UIservice.ShowMessage("Test message", "Test caption", _
        System.Windows.Forms.MessageBoxButtons.AbortRetryIgnore)
End If

Remarques

Cette méthode garantit que l’affichage de la boîte de message est correctement intégré à l’environnement de développement.

S’applique à

ShowMessage(String, String)

Source:
IUIService.cs
Source:
IUIService.cs
Source:
IUIService.cs
Source:
IUIService.cs
Source:
IUIService.cs

Affiche le message spécifié dans une zone de message avec la légende spécifiée.

public:
 void ShowMessage(System::String ^ message, System::String ^ caption);
public void ShowMessage(string message, string caption);
abstract member ShowMessage : string * string -> unit
Public Sub ShowMessage (message As String, caption As String)

Paramètres

message
String

Le message à afficher.

caption
String

Légende de la zone de message.

Exemples

L’exemple de code suivant tente d’obtenir une instance du IUIService service et d’appeler la méthode du ShowMessage service.

IUIService^ UIservice = dynamic_cast<IUIService^>(this->GetService( System::Windows::Forms::Design::IUIService::typeid ));
if ( UIservice != nullptr )
      UIservice->ShowMessage( "Test message", "Test caption", System::Windows::Forms::MessageBoxButtons::AbortRetryIgnore );
IUIService UIservice = (IUIService)this.GetService( 
    typeof( System.Windows.Forms.Design.IUIService ) );
if( UIservice != null )            
    UIservice.ShowMessage("Test message", "Test caption", 
        System.Windows.Forms.MessageBoxButtons.AbortRetryIgnore);
Dim UIservice As IUIService = CType(Me.GetService( _
    GetType(System.Windows.Forms.Design.IUIService)), IUIService)
If (UIservice IsNot Nothing) Then
    UIservice.ShowMessage("Test message", "Test caption", _
        System.Windows.Forms.MessageBoxButtons.AbortRetryIgnore)
End If

Remarques

Cette méthode garantit que l’affichage de la boîte de message est correctement intégré à l’environnement de développement.

S’applique à

ShowMessage(String, String, MessageBoxButtons)

Source:
IUIService.cs
Source:
IUIService.cs
Source:
IUIService.cs
Source:
IUIService.cs
Source:
IUIService.cs

Affiche le message spécifié dans une boîte de message avec la légende et les boutons spécifiés à placer dans la boîte de dialogue.

public:
 System::Windows::Forms::DialogResult ShowMessage(System::String ^ message, System::String ^ caption, System::Windows::Forms::MessageBoxButtons buttons);
public System.Windows.Forms.DialogResult ShowMessage(string message, string caption, System.Windows.Forms.MessageBoxButtons buttons);
abstract member ShowMessage : string * string * System.Windows.Forms.MessageBoxButtons -> System.Windows.Forms.DialogResult
Public Function ShowMessage (message As String, caption As String, buttons As MessageBoxButtons) As DialogResult

Paramètres

message
String

Le message à afficher.

caption
String

Légende de la boîte de dialogue.

buttons
MessageBoxButtons

Une des MessageBoxButtons valeurs : OK, , OKCancelYesNo, ou YesNoCancel.

Retours

Une des DialogResult valeurs indiquant le code de résultat retourné par la boîte de dialogue.

Exemples

L’exemple de code suivant montre comment utiliser la ShowMessage méthode pour afficher une boîte de message.

IUIService^ UIservice = dynamic_cast<IUIService^>(this->GetService( System::Windows::Forms::Design::IUIService::typeid ));
if ( UIservice != nullptr )
      UIservice->ShowMessage( "Test message", "Test caption", System::Windows::Forms::MessageBoxButtons::AbortRetryIgnore );
IUIService UIservice = (IUIService)this.GetService( 
    typeof( System.Windows.Forms.Design.IUIService ) );
if( UIservice != null )            
    UIservice.ShowMessage("Test message", "Test caption", 
        System.Windows.Forms.MessageBoxButtons.AbortRetryIgnore);
Dim UIservice As IUIService = CType(Me.GetService( _
    GetType(System.Windows.Forms.Design.IUIService)), IUIService)
If (UIservice IsNot Nothing) Then
    UIservice.ShowMessage("Test message", "Test caption", _
        System.Windows.Forms.MessageBoxButtons.AbortRetryIgnore)
End If

Remarques

Cette méthode garantit que l’affichage de la boîte de message est correctement intégré à l’environnement de développement.

Voir aussi

S’applique à