MessageBox

In the System.Windows.Forms namespace you have the MessageBox class.
link - learn.microsoft.com/en-us/dotnet/api/system.windows.forms.messagebox?view=net-5.0

System.Windows.Forms.MessageBox.Show( 
   System.Windows.Forms.IWin32Window owner,
   string text,
   string caption, _
   System.Windows.Forms.MessageBoxButtons buttons
   System.Windows.Forms.MessageBoxIcon icon
   System.Windows.Forms.MessageBoxDefaultButton defaultbutton
   System.Windows.Forms.MessageBoxOptions options)
   As System.Windows.Forms.DialogResult

MessageBoxButtons

AbortRetryIgnore 
OK 
OKCancel 
RetryCancel 
YesNo 
YesNoCancel 

MessageBoxIcon

NoneThe message box contain no symbols.
InformationThe message box contains a symbol consisting of a lowercase letter i in a circle.
Asterisksame as above
ErrorThe message box contains a symbol consisting of white X in a circle with a red background.
Handsame as above
Stopsame as above
ExclamationThe message box contains a symbol consisting of an exclamation point in a triangle with a yellow background.
Warningsame as above
QuestionThe message box contains a symbol consisting of a question mark in a circle.

MessageBoxDefaultButton

Button1 The first button on the message box is the default button.
Button2 The second button on the message box is the default button.
Button3 The third button on the message box is the default button.

MessageBoxOptions

DefaultDesktopOnlyThe message box is displayed on the active desktop. This constant is the same as ServiceNotification except that the system displays the message box only on the default desktop of the interactive window station DefaultDesktopOnly will cause the application that raised the MessageBox to lose focus. The MessageBox that is displayed will not use visual styles. For more information, see Rendering Controls with Visual Styles.
RightAlignThe message box text is right-aligned.
RtlReadingSpecifies that the message box text is displayed with right to left reading order.
ServiceNotificationThe message box is displayed on the active desktop. The caller is a service notifying the user of an event. The function displays a message box on the current active desktop, even if there is no user logged on to the computer.

DialogResult

Abort 
Cancel 
Ignore 
No 
None 
OK 
Retry 
Yes 

© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited TopPrevNext