How to change textbox text color in C#

2 Answers

0 votes
namespace WinFormsApp1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            textBox1.ForeColor = Color.FromArgb(129, 155, 76);
        }
    }
}




/*
 * run:
 *
 * 
 * 
 */

 



answered Sep 26, 2023 by avibootz
0 votes
namespace WinFormsApp1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            textBox1.ForeColor = Color.CadetBlue;
        }
    }
}




/*
 * run:
 *
 * 
 * 
 */

 



answered Sep 26, 2023 by avibootz

Related questions

1 answer 112 views
1 answer 116 views
116 views asked Aug 5, 2023 by avibootz
1 answer 116 views
116 views asked Aug 1, 2023 by avibootz
1 answer 192 views
1 answer 160 views
...