你自己做一个 Form 然后 ShowDialog 嘛。

解决方案 »

  1.   

    MessageBox是操作系统定义的,没办法更改。自己做一个类似的就可以了。
      

  2.   

    自定义MESSAGEBOX
      

  3.   


    这样的话    form1里面的 结果文本A 是没办法在form2里引用
      

  4.   


    这样的话    form1里面的 结果文本A 是没办法在form2里引用兄弟 没有什么 是 程序 完不成的你在 form2 里 定义个变量 来 接收 form1 传过去的文本 就 可以了
      

  5.   

        public partial class Form1 : Form
        {
            public Form1()
            {
                InitializeComponent();
                MyMessageBox.ShowMessageBox("搜索成功,此项标注在A文本内", "结果文本");
            }
        }    public class MyMessageBox : Form
        {
            Label lblText;
            Button btnEnter;        MyMessageBox()
            {
                this.Size = new Size(250, 200);
                this.Controls.AddRange(new Control[]
                    {
                        lblText = new Label(){Location=new Point(90,50)},
                        btnEnter = new Button(){Location=new Point(90,100)}
                    });
            }        public static void ShowMessageBox(string Title, string Text)
            {
                MyMessageBox MsgBox = new MyMessageBox();
                MsgBox.MaximizeBox = false;
                MsgBox.MinimizeBox = false;
                MsgBox.Text = Title;
                MsgBox.btnEnter.Text = "确定";
                MsgBox.lblText.Text = Text;
                MsgBox.lblText.ForeColor = Color.Red;
                MsgBox.ShowDialog();
            }
        }