ColorDialog MyDialog = new ColorDialog();
            // Keeps the user from selecting a custom color.
            MyDialog.AllowFullOpen = false;
            // Allows the user to get help. (The default is false.)
            MyDialog.ShowHelp = true;
            // Sets the initial color select to the current text color.
            MyDialog.Color = textBox1.ForeColor;

            // Update the text box color if the user clicks OK
            if (MyDialog.ShowDialog() == DialogResult.OK)
                textBox1.ForeColor = MyDialog.Color;

相关文章:

  • 2022-12-23
  • 2021-10-26
  • 2022-12-23
  • 2021-08-23
  • 2021-11-29
  • 2021-12-03
  • 2021-11-16
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-09-15
  • 2021-08-28
  • 2021-09-13
相关资源
相似解决方案