[RESOLVED] Picture autosize not working. (Due to other functions on form)
Hello,
Can someone please tell me why the attached program's auto size picture box does not work?
I just need to know what code is doing it.
Thank you!
Stilekid007
Re: Picture autosize not working. (Due to other functions on form)
The attachment seems to be missing :)
1 Attachment(s)
Re: Picture autosize not working. (Due to other functions on form)
HAHA! Sorry about that! My bad!
Re: Picture autosize not working. (Due to other functions on form)
Also moved from the codebank ;)
What doesn't work exactly? It seems to work as it should: load the image and fix the scrollbars depending on the height and width of the image if it's bigger... Could you explain the problem a bit more?
Thanks
Re: Picture autosize not working. (Due to other functions on form)
Well see I want the scroll bars only if the picture is bigger than the form. So it would auto size and then if the picture is bigger then the form (Maximized) then it will put the scroll bars on.
I can figure all the code out for that now, but what I need help with is getting the picture box that is in that program to autosize then I can take it from there.
So all I need is you to get it to autosize the same size as the pic that is loaded.
Thanks man!
Stilekid007
Re: Picture autosize not working. (Due to other functions on form)
The problem is that in the OnImageLoad sub you compare the height/width of the picShowImage and picContainer pictureboxes... The size of picContainer doesn't change though. Since picShowImage is where the image gets loaded, after it's loaded and resized, you should set the size of picContainer to the same as picShowImage and then make picContainer smaller is it's bigger than the form. Make sense? :)
Re: Picture autosize not working. (Due to other functions on form)
Ahh yes I see. I think that will work. I will let you know if I run into something with it.
Thank you and have a great day!
Stilekid007
Re: [RESOLVED] Picture autosize not working. (Due to other functions on form)
You're welcome :) Just post back if you run into any problems :)