Hi, I have a textbox which I want to change the font colour when you input a number after a certain number (in my case Pi*2)..
Although the code I wrote gives me this error : Unable to cast object of type 'System.Windows.Forms.TextBox' to type 'System.IConvertible'.
I don't understand the error..
So that's what I wrote:
if (Convert.ToDouble(textBox1.Text) > Math.PI*2)
{
textBox1.BackColor = Color.Red;
}
thanks for helping me, I truly appreciate it!