C# formatting a MessageBox

前端 未结 5 1236
你的背包
你的背包 2020-12-19 01:32

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

5条回答
  •  离开以前
    2020-12-19 02:09

    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.

提交回复
热议问题