Advertisement
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;
- namespace JovanPanicTestGrupa2__2
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- private void button2_Click(object sender, EventArgs e)
- {
- pictureBox1.Image = null;
- }
- private void button1_Click(object sender, EventArgs e)
- {
- Crtaj();
- }
- private void Crtaj()
- {
- Graphics g = pictureBox1.CreateGraphics();
- SolidBrush cetka = new SolidBrush(Color.Blue);
- g.FillRectangle(cetka, 0, 0, 20, 20);
- g.FillRectangle(cetka, 30, 0, 20, 20);
- g.FillRectangle(cetka, 0, 30, 20, 20);
- g.FillRectangle(cetka, 30, 30, 20, 20);
- g.FillRectangle(cetka, 50, 0, 100, 10);
- g.FillRectangle(cetka, 50, 20, 100, 10);
- g.FillRectangle(cetka, 50, 40, 100, 10);
- g.FillRectangle(cetka, 0, 60, 150, 10);
- g.FillRectangle(cetka, 0, 80, 150, 10);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement