SEP900 Posted June 4, 2004 Posted June 4, 2004 Hi, I have a problem here. See if you guys know how to solve this please! I have a form, within it is a picture box and other buttons etc... i want it so that when my form resizes, my picture box will resize accordingly However, when i put this.SizeChange += .... the event handler and change the picture box size as the form size changes, i noticed that when i drag the form to resize, i tries to resize a bunch of times. Is there a way to make it resize only when i finish dragging the form. IE: when the mouse button is released? this.MouseUp doesn't work since dragging the form is not part of the client window. Any suggestions would be nice Thanks~! Quote
*Experts* Nerseus Posted June 4, 2004 *Experts* Posted June 4, 2004 Have you tried the Anchor property of the PictureBox? It should handle the resizing automagically. -nerseus Quote "I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
SEP900 Posted June 8, 2004 Author Posted June 8, 2004 Have you tried the Anchor property of the PictureBox? It should handle the resizing automagically. -nerseus yes but that stretches it unproportionatly. I just noticed the FAQ provided within this website actually has a method that is used with eventhandler to do this. It forces the layout to change only when u stop draggin. Therefore u can do ur calculation and fix the proportion after the user finishs dragging its pretty neat. dunno if its the most efficent way to do it thou Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.