Answers for "c# graphics draw filled rectangle"

C#
0

c# graphics draw filled rectangle

private void FillRectangleRectangle(PaintEventArgs e)
{

    // Create solid brush.
    SolidBrush blueBrush = new SolidBrush(Color.Blue);

    // Create rectangle.
    Rectangle rect = new Rectangle(0, 0, 200, 200);

    // Fill rectangle to screen.
    e.Graphics.FillRectangle(blueBrush, rect);
}
Posted by: Guest on March-18-2020

C# Answers by Framework

Browse Popular Code Answers by Language