VB6 Image/Picture handling
Posted on 2011-03-07
I have a Form that has following Controls:
1) either an Image Control or a PictureBox control (Whichever is more suitable for my usage) called Image1
2) An Horizontal scrollbar called HScrollbar1
3) A Vertical scrollbar called VScrollbar1
The main purpose of the Form is to display an Image in the size of the form when the user doubleclik on my project's smaller picturebox. My main purpose is to enlarge a picture in the Form and I would like to acheive the following:
1) I need to be able to zoom In and Out of the picture (what is the code for that)
2) I need to have the Picture Fit the Form ie if I maximize the form the picture need to fit the entire Form and vice versa when I resize the form the picture need to be resized. (What is the code for that)
3) I need Both scrollbar to be able to navigate and see the picture from left to extreem right and from top to bottom. I have diffrent picture sizes I always need the Max in both scrollbar to navigate to the Max size image wether width wyse or height wyse. (Also what is the code for that).
4) I need to be able to also Print The picture and Copy it to clipboard if necessary and what is the code for that.
My findings so far showed me that in the Image control there is a property that is called Stretch that will squeeze the pic to fit the Image control size which is not available in the PictureBox what is the alternative for that in picture box and which control is better for my usage.