G
Guest
this code should work:
Using gb As New LinearGradientBrush(e.CellBounds,
Colors.OfficeColor1, Colors.OfficeColor2, LinearGradientMode.Vertical)
Dim b As Blend = New Blend(5)
b.Factors = New Single() {0.2F, 0.4F, 0.6F, 0.8F, 1.0F}
b.Positions = New Single() {0.1F, 0.2F, 0.3F, 0.4F, 0.5F}
gb.Blend = b
e.Graphics.FillRectangle(gb, e.CellBounds)
End Using
the line: gb.Blend = b throws an ArgumentException: Parameter is not Valid..
anyone know why? this code is almost verbatim from a MS example in VS 2005
help
Using gb As New LinearGradientBrush(e.CellBounds,
Colors.OfficeColor1, Colors.OfficeColor2, LinearGradientMode.Vertical)
Dim b As Blend = New Blend(5)
b.Factors = New Single() {0.2F, 0.4F, 0.6F, 0.8F, 1.0F}
b.Positions = New Single() {0.1F, 0.2F, 0.3F, 0.4F, 0.5F}
gb.Blend = b
e.Graphics.FillRectangle(gb, e.CellBounds)
End Using
the line: gb.Blend = b throws an ArgumentException: Parameter is not Valid..
anyone know why? this code is almost verbatim from a MS example in VS 2005
help