Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

how to change WinForm controls' text color programatically?

BobLewistonBobLewiston Member Posts: 43
Can anybody tell me how to change WinForm controls' text color programatically? I have no problem finding the fields to assign colors to, but the compiler doesn't recognize any color I mention, whether it's something like WindowText, or something like Red.

BTW, I'm using VC# Express 2008.

Comments

  • OaklandstyleOaklandstyle Member Posts: 4
    Have you tried using color.red

    im not sure what you were changing. I made just a button, and a label and used these to change the background color of the form and the text color of the label

    BackColor = Color.Red;
    label1.ForeColor = Color.Blue;

    so i assume that it would work with almost any control as long as u put .ForeColor = Color.(Color)
    I dont know anything about C#, so i hope this helped
  • BobLewistonBobLewiston Member Posts: 43
    Oaklandstyle:

    In VC# Express 2008, the problem is that you can only change a TextBox's ForeColor if you also change it's BackColor.
  • OaklandstyleOaklandstyle Member Posts: 4
    As I said before I know nothing about VC# so I guess i dont understand. I changed the forecolor of a textbox without changing its BackColor.
Sign In or Register to comment.