jeudi 30 octobre 2014

FillRectangle on button Click into the form


Vote count:

0




I want to draw(Fill) a rectangle in to my form when I click on the button.



private void Form1_Paint(object sender, PaintEventArgs e)
{
Graphics g = e.Graphics; //verklaart naar object Graphics
Vierkant vierkant = new Vierkant();
}

private void vierkant_Click(object sender, EventArgs e)
{
SolidBrush myBrush = new SolidBrush(Color.Cyan);
g.FillRectangle(myBrush, 20, 20, 50, 50);
}


asked 14 secs ago







FillRectangle on button Click into the form

Aucun commentaire:

Enregistrer un commentaire