How to change brush color...?


  • I have a fontdialog where I pass the font type, size and color to a lable control.

    Then in the document drawing I want to pass the color from the lable control to the is not constructable???

    I have tried this...

    Dim FontBrush as new brush  &  system.drawing.brushes.brush


    with fontbrush

    .color = labelcontrol.forecolor

    end with...

    It dont the heck can I specify in the drawstring funtion a brush color OTHER than the ones listed in the dropdown??



    Thursday, January 26, 2006 10:57 PM


  • There are three brush types, SolidBrush, GradientBrush and TextureBrush.  You probalbly want SolidBrush, in which case there is also a Brushes enum you can use rather than creating a new brush, which you would then need to dispose.  Brush is just a base class.

    Thursday, January 26, 2006 11:44 PM