I want to display a MessageBox alerting the user that the process is complete, and giving a breakdown on how long each stage of the process took. I\'ve got the text that I w
For the record, this is in fact possible, MessageBox() expands tabs. For example:
private void button1_Click(object sender, EventArgs e) {
MessageBox.Show(
"hello\tworld\r\n" +
"second\tline");
}
It isn't very trustworthy if the word width starts to approach the tab width. You still should prefer a little helper form with a ListView.
Sounds like you may just want to drop a new form in there and use a few labels..
Any reason not to just create a Form
with a textbox/label using a monospace font, then call Form.ShowDialog
? Sounds like a separate library with that would be overkill to me.
I use this:
public void myMessageBox(object str)
{
System.Windows.Forms.MessageBox.Show( new System.Windows.Forms.Form{ TopMost = true, Width = 300}, str.ToString() );
}
I have just written a single file replacement for MessageBox with a changeable font. You can download it here and use it like a standard MessageBox:
http://www.codeproject.com/Articles/601900/FlexibleMessageBox-A-flexible-replacement-for-the
Regards, Jörg