![Avatar](https://secure.gravatar.com/avatar/fd5e4c30fe97fbcfe6ac0c7a91155cde.jpg?s=64&d=identicon&r=g)
Hello,
i like to fill the background of the buttons (back, next, cancel ...) with a LinearGradientBrush manually.
Here is my code:Unfortunately this code doesn't work.
Does the buttons support the function CreateGraphics or what could be the problem here?
Best regards
Lars Michel
i like to fill the background of the buttons (back, next, cancel ...) with a LinearGradientBrush manually.
Here is my code:
Dim rect As Rectangle = _
New Rectangle(0, 0, _
Me.Wizard1.CancelButton.Width, _
Me.Wizard1.CancelButton.Height)
Dim brush As LinearGradientBrush = _
New LinearGradientBrush(rect, _
Color.Yellow, Color.Red, _
LinearGradientMode.Horizontal)
Dim g As Graphics
g = Me.Wizard1.CancelButton.CreateGraphics
g.FillRectangle(brush, rect)
Does the buttons support the function CreateGraphics or what could be the problem here?
Best regards
Lars Michel