views:

34

answers:

1

I just can't give a good title to my question, sorry.

I have 3x3 picture boxes on a form, what I want to do is when the user double click on one of the 9 picture box, I want to make the clicked picture box take the whole area, kind like a zoom effect, any idea how to implement this effect?

+1  A: 

If your picturebox in form directly, you can do

pictureBox1.Dock = DockStyle.Fill;
pictureBox1.SizeMode = PictureBoxSizeMode.StretchImage;  

else you need to set size and location.

    pictureBox1.Location = new Point(0, 0);
    pictureBox1.Size = this.Size;
    pictureBox1.SizeMode = PictureBoxSizeMode.StretchImage;  

you can select zoom sizemode to keep image quality.

Brij