MessageForm.cs
/// <summary>
/// Returns the MessageText of the Form
/// </summary>
/// <param name="title">The title bar text</param>
/// <param name="message">The initial message text to display</param>
/// <param name="icon">the Icon to use</param>
/// <param name="editable">true to allow the user to edit the MessageText</param>
/// <returns>The resulting MessageText</returns>
Returns the MessageText of the Form
Returns the MessageText of the Form
public static string ShowMessage(string title, string message, Icon icon, bool editable, bool showCancelButton)
        {
            string retVal = null;
            MessageForm mf = new MessageForm(icon);
            mf.MessageEditable = editable;
            mf.Text = title;
            mf.MessageText = message;
            mf.ShowCancelButton = showCancelButton;
            if (mf.ShowDialog() == DialogResult.OK)
            {
                retVal = mf.MessageText;
            }
            mf.Dispose();
            return retVal;
        }
public static string ShowMessage ( string title , string message , Icon icon , bool editable , bool showCancelButton ) { string retVal = null ; MessageForm mf = new MessageForm ( icon ) ; mf . MessageEditable = editable ; mf . Text = title ; mf . MessageText = message ; mf . ShowCancelButton = showCancelButton ; if ( mf . ShowDialog ( ) == DialogResult . OK ) { retVal = mf . MessageText ; } mf . Dispose ( ) ; return retVal ; }
Returns the MessageText of the Form
Returns the MessageText of the Form
The resulting MessageText
The resulting MessageText
title
string
The title bar text
The title bar text
message
string
The initial message text to display
The initial message text to display
icon
Icon
the Icon to use
the Icon to use
editable
bool
true to allow the user to edit the MessageText
true to allow the user to edit the MessageText
showCancelButton
bool