What is ForeColor For??

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • **Developer**

    What is ForeColor For??

    Both the UserControl and the PictureBox has a ForeColor Property.

    I've set them to odd colors so I'd see the effects but they don't show.



    What are the used for?



    Thanks in advance


  • Chris

    #2
    Re: What is ForeColor For??

    **Developer** wrote:[color=blue]
    > Both the UserControl and the PictureBox has a ForeColor Property.
    >
    > I've set them to odd colors so I'd see the effects but they don't show.
    >
    >
    >
    > What are the used for?
    >
    >
    >
    > Thanks in advance
    >
    >[/color]

    Forecolor gets inherited from Control. So everything that inherits from
    Control will have that property. Weither or not the control uses the
    property is up to the implementation.

    Chris

    Comment

    • Herfried K. Wagner [MVP]

      #3
      Re: What is ForeColor For??

      " **Developer**" <REMOVEdevelope r@a-znet.com> schrieb:[color=blue]
      > Both the UserControl and the PictureBox has a ForeColor Property.
      >
      > I've set them to odd colors so I'd see the effects but they don't show.[/color]

      'ForeColor' is typically used to control the color of the text drawn onto
      the control. You can use this property's value when drawing text onto
      usercontrols or panels. The property gets inherited from the
      'System.Windows .Forms.Control' class.

      --
      M S Herfried K. Wagner
      M V P <URL:http://dotnet.mvps.org/>
      V B <URL:http://classicvb.org/petition/>

      Comment

      • **Developer**

        #4
        Re: What is ForeColor For??


        Seems to me that for a usercontrol and for PictureBox I have to specify a
        pen or a brush to write on it.

        So ForeColor is never used unless I add a procedure that uses it. Right?

        Thanks.

        " **Developer**" <REMOVEdevelope r@a-znet.com> wrote in message
        news:%23OjzTVim FHA.2860@TK2MSF TNGP15.phx.gbl. ..[color=blue]
        > Both the UserControl and the PictureBox has a ForeColor Property.
        >
        > I've set them to odd colors so I'd see the effects but they don't show.
        >
        >
        >
        > What are the used for?
        >
        >
        >
        > Thanks in advance
        >
        >[/color]


        Comment

        • Dennis

          #5
          Re: What is ForeColor For??

          When you use a pen or brush to write/draw on a usercontrol, you can set the
          pen or brush to the control's forecolor. This gives users of your control a
          way to control the color of the writing or drawing.
          --
          Dennis in Houston


          "**Develope r**" wrote:
          [color=blue]
          >
          > Seems to me that for a usercontrol and for PictureBox I have to specify a
          > pen or a brush to write on it.
          >
          > So ForeColor is never used unless I add a procedure that uses it. Right?
          >
          > Thanks.
          >
          > " **Developer**" <REMOVEdevelope r@a-znet.com> wrote in message
          > news:%23OjzTVim FHA.2860@TK2MSF TNGP15.phx.gbl. ..[color=green]
          > > Both the UserControl and the PictureBox has a ForeColor Property.
          > >
          > > I've set them to odd colors so I'd see the effects but they don't show.
          > >
          > >
          > >
          > > What are the used for?
          > >
          > >
          > >
          > > Thanks in advance
          > >
          > >[/color]
          >
          >
          >[/color]

          Comment

          • **Developer**

            #6
            Re: What is ForeColor For??

            Thanks

            "Dennis" <Dennis@discuss ions.microsoft. com> wrote in message
            news:7F1F6E4D-996D-455C-AE6D-786F5A860355@mi crosoft.com...[color=blue]
            > When you use a pen or brush to write/draw on a usercontrol, you can set
            > the
            > pen or brush to the control's forecolor. This gives users of your control
            > a
            > way to control the color of the writing or drawing.
            > --
            > Dennis in Houston
            >
            >
            > "**Develope r**" wrote:
            >[color=green]
            >>
            >> Seems to me that for a usercontrol and for PictureBox I have to specify a
            >> pen or a brush to write on it.
            >>
            >> So ForeColor is never used unless I add a procedure that uses it. Right?
            >>
            >> Thanks.
            >>
            >> " **Developer**" <REMOVEdevelope r@a-znet.com> wrote in message
            >> news:%23OjzTVim FHA.2860@TK2MSF TNGP15.phx.gbl. ..[color=darkred]
            >> > Both the UserControl and the PictureBox has a ForeColor Property.
            >> >
            >> > I've set them to odd colors so I'd see the effects but they don't show.
            >> >
            >> >
            >> >
            >> > What are the used for?
            >> >
            >> >
            >> >
            >> > Thanks in advance
            >> >
            >> >[/color]
            >>
            >>
            >>[/color][/color]


            Comment

            Working...