[RESOLVED] Restricting a picture box size to the form size.
Hello,
I have form and a pic box on that. Now I have auto resize set to True. But if the picture is bigger than the form part of the picture gets lost behind the form. Is there any way to make the picture box only go so big but still have the auto size on true?
Thank you for your help and have a great day!
Stilekid007
Re: restricting a picture box size to the form size.
Yeah, in the picbox_resize event...
VB Code:
if picbox.width > me.width then picbox.width = me.width
if picbox.height > me.height then picbox.height = me.height
Try that, replacing picbox with the picturebox's actual name of course.
Re: Restricting a picture box size to the form size.
Do you want to make the form bigger or the image smaller? I'm a bit confused :)
Re: Restricting a picture box size to the form size.
I am trying to make the image smaller. However - Nova's code worked great! Thank you all for your help and solutions!
Stilekid007
Re: [RESOLVED] Restricting a picture box size to the form size.