Message Box Properties in C #

in C # winforms, when we show the message box, it has no title in the title bar, and there is no title bar in its button.

What if I want to set the title and icon for the message box.

one option is to create a form that appears and behaves like a message box, and I show and hide it whenever I want. yes, what can be done, but I want to change the "MessageBox"

+7
c # properties winforms messagebox title
source share
3 answers

Use MessageBox.Show overloads such as:

public static DialogResult Show( string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon ) 

transmission of the title text in the title and the icon in the icon, for example.

 MessageBox.Show("Oh noes!", "My Application", MessageBoxButtons.OK, MessageBoxIcon.Error); 
+27
source share

There is an overloaded version of the show message box that will accept a title bar and allow you to specify an icon and a number / type of buttons.

+1
source share

The MessageBox.Show method has a bunch of overrides that let you set popup properties.

http://msdn.microsoft.com/en-us/library/system.windows.forms.messagebox.show%28VS.71%29.aspx

+1
source share

All Articles