Using Using Using Using Using Using Using: Eventargs
Using Using Using Using Using Using Using: Eventargs
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
usins System.Collection;
namespace assignment
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Collections;
namespace graphics
{
public partial class Form1 : Form
{
Graphics g;
public Form1()
{
InitializeComponent();
g = this.CreateGraphics();
}
int x1 = 50;
int y1 = 30;
int x2 = 50;
int y2 = 500;
int width = 0;
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace pencil
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
Graphics g;
int x1, y1, x2, y2;
private void Form1_Load(object sender, EventArgs e)
{
}
}
}
2 buttons of draw & erase when draw click line drawn and when erase
click then erase line
using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
namespace ClassLine
{
public class Line
{
public int x1, y1, x2, y2;
public Pen p1;
public Graphics g;
public int width;
public Line(Color c, int w, Graphics g)
{
this.g = g;
width = w;
p1 = new Pen(c, w);
}
public void DrawLine()
{
g.DrawLine(p1, x1, y1, x2, y2);
}
public void Erase(Color c)
{
Pen p1 = new Pen(c, width);
g.DrawLine(p1, x1, y1, x2, y2);
}
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace ClassLine
{
public partial class Form1 : Form
{
Graphics g;
public Form1()
{
InitializeComponent();
g = this.CreateGraphics();
}
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Collections;
namespace Defined_Color_Line
{
public partial class Form1 : Form
{
Graphics g;
int i, j, k, l, h = 0;
public Form1()
{
InitializeComponent();
g = this.CreateGraphics();
}
if (h == 0)
{
i = (e.X);
j = (e.Y);
h++;
}
else
{
k = (e.X);
l = (e.Y);
}
}
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Collections;
namespace @new
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
ArrayList colors = new ArrayList();
colors.Add(Color.Red);
colors.Add(Color.Green);
colors.Add(Color.Blue);
else
{
comboBox1.Items.Add(colors.Add(Color.FromArgb(Int32.Parse(textBox1.Text)
, Int32.Parse(textBox2.Text), Int32.Parse(textBox3.Text))) +
nametextBox4.Text);
break;
}
}
}
}