Hi,


I have a picturebox on the form, when it is clicked, I want the picturebox to fit the size of the form, which can be done by
pic.SizeToFit = true

So, the picturebox will automatically change the size.

But after that, I want to set pic.SizeToFit = false , I need this because the picturebox is a user control which has a image Pannign feature, and it works only when the picturebox.SizeToFit = false

Now, the problem is: I can not set it = false in the mouse click event, because I need set it = true, so the pic will change size.

basically, what I need is: after mouse click event finished, change SizeToFit = false.

One way to do it is in mouse click event, start a timer, after several seconds, set SizeToFit = false. Or, use a thread. It will work. But, is there a more elegant way to do this?

thanks


bear