Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- using System.Drawing.Drawing2D;
- namespace lab9_githab
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- private void Form1_Paint(object sender, PaintEventArgs e)
- {
- /* Draw circle */
- Graphics g = e.Graphics;
- Pen myPen = new Pen(Color.Blue, 9);
- g.DrawEllipse(myPen, 150, 150, 50, 50);
- /* Draw filled rectangle */
- System.Drawing.SolidBrush myBrush = new System.Drawing.SolidBrush(System.Drawing.Color.Red);
- System.Drawing.Graphics formGraphics;
- formGraphics = this.CreateGraphics();
- g.FillRectangle(myBrush, new Rectangle(0, 0, 50, 50));
- myBrush.Dispose();
- g.Dispose();
- }
- }
- }
Add Comment
Please, Sign In to add comment