Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- GRAFIKA
- Graphics g = e.Graphics;
- Pen olovka = new Pen(Color.Red, 10);
- //ClientRectangle int x = ClientRectangle.Width;
- int y = ClientRectangle.Height;
- Point A = new Point (50, 50);
- Point B = new Point (100, 100);
- g.DrawLine(olovka, A, B);
- ========================
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Windows.Forms;
- namespace _06112013_Prav__elip__dija
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- private void button1_Click(object sender, EventArgs e)
- {
- pictureBox1.Refresh();
- Graphics g = pictureBox1.CreateGraphics();
- Pen olovka = new Pen(Color.Blue, 5);
- g.DrawRectangle(olovka, 100, 50, 200, 100);
- }
- private void button2_Click(object sender, EventArgs e)
- {
- pictureBox1.Refresh();
- Graphics g = pictureBox1.CreateGraphics();
- Pen olovka2 = new Pen(Color.Blue, 5);
- g.DrawEllipse(olovka2, 100, 50, 200, 100);
- }
- private void button3_Click(object sender, EventArgs e)
- {
- pictureBox1.Refresh();
- Graphics g = pictureBox1.CreateGraphics();
- Pen olovka3 = new Pen(Color.Blue, 5);
- Point A = new Point(100, 50);
- Point B = new Point(300, 150);
- Point C = new Point(300, 50);
- Point D = new Point(100, 150);
- g.DrawLine(olovka3, A, B);
- g.DrawLine(olovka3, C, D);
- }
- }
- }
- =======================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement