Hi I have a picture box on my windows forms.
I load a picture in it and I have enabled Paint Event on my code.It draws a rectangle.
Like this;
private void pictureBox1_Paint(object sender, PaintEventArgs e)
{
Graphics gr = e.Graphics;
Pen p = new Pen(Color.Red);
p.Width = 5.0f;
gr.DrawRectangle(p, 1, 2, 30, 40);
}
And I click "save" button;
private void button2_Click(object sender, EventArgs e)
{
pictureBox1.Image.Save(@"C:\Documents and Settings\tr1g3800\Desktop\WALKING\30P\100000test.jpg",ImageFormat.Jpeg);
}
but the saved file never contains rectangle that I draw.
Does any one have an idea ?
Thankx
Tugrul