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.Windows.Forms;
- using System.IO;
- namespace ImageEditor
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- private void button1_Click(object sender, EventArgs e)
- {
- OpenFileDialog opendialog = new OpenFileDialog();
- opendialog.ShowDialog();
- Bitmap bit1 = new Bitmap(opendialog.FileName);
- pictureBox1.Image = bit1;
- }
- private void button3_Click(object sender, EventArgs e)
- {
- colordiag.ShowDialog();
- }
- private void pictureBox1_Click(object sender, EventArgs e)
- {
- Control control1 = new Control();
- Point pnt1 = new Point(MousePosition.X);
- Point pnt2 = new Point(MousePosition.Y);
- Pen pen1 = new Pen(colordiag.Color);
- Graphics gra = new Graphics();
- gra.DrawLine(pen1, pnt1, pnt2);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment