|
32.1 How can I programmatically maximize or minimize a form?
|
The Brushes Sample shows you how to use four different brushes in several shapes. Below is a code snippet showing how to use hatched and gradient brushes.
|
Rectangle rect = new Rectangle(35, 190, 100, 100);
|
LinearGradientBrush brush2 = new LinearGradientBrush(rect,
|
Color.DarkOrange, Color.Aquamarine,
|
LinearGradientMode.ForwardDiagonal);
|
g.FillEllipse(brush2, 35, 190, 100, 100);
|
HatchBrush brush1 = new HatchBrush(HatchStyle.DiagonalCross,
|
Color.DarkOrange, Color.Aquamarine);
|
g.FillEllipse(brush1, 35, 190, 100, 100);
|
|
|
|