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
Has someone helped you? Then you can Rate their helpful post.
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.
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?
Has someone helped you? Then you can Rate their helpful post.