示例#1
0
        private void NewMessageBox_Load(object sender, EventArgs e)
        {
            if (mbb == MessageBoxButtons.OK)
            {
                OKButton.Show();
                CancelButton.Hide();
                YesButton.Hide();
                NoButton.Hide();
            }

            if (mbb == MessageBoxButtons.OKCancel)
            {
                OKButton.Show();
                CancelButton.Show();
                CancelButton.Location = new Point(175, 169);
                YesButton.Hide();
                NoButton.Hide();
            }

            if (mbb == MessageBoxButtons.YesNo)
            {
                OKButton.Hide();
                CancelButton.Hide();
                YesButton.Show();
                NoButton.Show();
            }

            if (mbb == MessageBoxButtons.YesNoCancel)
            {
                OKButton.Hide();
                CancelButton.Show();
                CancelButton.Location = new Point(120, 169);
                YesButton.Show();
                NoButton.Show();
            }
        }