How to set TextBox BackColor and ForeColor using WinForms in C#

1 Answer

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

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




/*
run:
 

  
*/

 



answered Jan 6, 2024 by avibootz

Related questions

1 answer 155 views
1 answer 124 views
1 answer 107 views
1 answer 132 views
1 answer 133 views
1 answer 150 views
1 answer 138 views
...