Label Font Color

Posted on 2006-04-18
Last Modified: 2013-12-03
I want to set my label's font color. I tried the below code (and I tried other things that didn't work too).

Question by:net_susan
    LVL 5

    Assisted Solution

    Hi, at runtime, use: lblMessage.ForeColor=Color.Red
    Good luck
    LVL 1

    Author Comment

    Compiler Error Message: BC30451: Name 'Color' is not declared.
    LVL 1

    Author Comment

    Oh, I actually had a solution in a different question of mine.


    But, I'm still curious why I can't make it work the other way.
    LVL 3

    Assisted Solution

    You could do this:

    lblStatus.ForeColor = "red";

    That will make your font red.
    LVL 5

    Accepted Solution

    I thought you have imported the System.Drawing,
    You may use it in this way:

    Or you may add this line to the first line of the module:
    Imports System.Drawing

    And then write this code:

    Good luck

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
    Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now