I found the following method in a graphics turtorial..
private void DrawShapesForm_ Paint(object sender, PaintEventArgs e)
{
// references to object we will use
Graphics graphicsObject = e.Graphics;
// ellipse rectangle and gradient brush
Rectangle drawArea1 = new Rectangle( 5, 35, 30, 100 );
LinearGradientB rush linearBrush =
new LinearGradientB rush ( drawArea1, Color.Blue,
Color.Yellow, LinearGradientM ode.ForwardDiag onal );
// draw ellipse filled with a blue-yellow gradient
graphicsObject. FillEllipse( linearBrush, 5, 30, 65, 100 );
}
My question is. What code should I put into the click event of
a command button to get it to execute from there?
TIA Mick.
private void DrawShapesForm_ Paint(object sender, PaintEventArgs e)
{
// references to object we will use
Graphics graphicsObject = e.Graphics;
// ellipse rectangle and gradient brush
Rectangle drawArea1 = new Rectangle( 5, 35, 30, 100 );
LinearGradientB rush linearBrush =
new LinearGradientB rush ( drawArea1, Color.Blue,
Color.Yellow, LinearGradientM ode.ForwardDiag onal );
// draw ellipse filled with a blue-yellow gradient
graphicsObject. FillEllipse( linearBrush, 5, 30, 65, 100 );
}
My question is. What code should I put into the click event of
a command button to get it to execute from there?
TIA Mick.
Comment