views:

39

answers:

1

I have an application that dynamically draws a chart onto a winform.

Both the chart background and the individual chart bars are drawn using a VisualStyleRenderer object:

 For Each rect As Rectangle In barRectangles

   Dim renderer As New VisualStyleRenderer (VisualStyleElement.StartPanel.UserPane.Normal)
   renderer.DrawBackground(e.Graphics, rect)
 next

this draws a nicely rendered rectangle with full XP visual styles, my question is: how do I change the colours used to draw the shape?

+1  A: 

This link might be helpful.

Effstati Barakoff