|
-
Aug 14th, 2000, 05:55 AM
#1
Thread Starter
Lively Member
Hello,
I have some BMPs, JPGs, etc. that my progam "previews". Problem is, is some of the pics are too big to fit in either the IMAGE or PICTUREBOX controls. How can I "fit" the picture, or have the pic automatically scale up or down to "fit" inside the box ?
I am using VB6.
Thanks,
-
Aug 14th, 2000, 05:59 AM
#2
Addicted Member
Hi,
If you use the image contol and set its Stretch property to TRUE then any picture you place inside will automatically resized to the image box size.
Hope this helps
Shaun
-
Aug 14th, 2000, 06:00 AM
#3
_______
<?>
For scale use the stretch property on the image box.
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Aug 14th, 2000, 07:42 AM
#4
When using a PictureBox, use PaintPicture. Make a Form with 2 PictureBoxes. Load your image in Picture2 and insert the following code into the Load() event.
Code:
Private Sub Form_Load()
'Make Picture2 invisible
Picture2.Visible = False
'ReDraw the Picture so it doesn't get cut off
Picture1.AutoRedraw = True
'Draw the Picture on to Picture1
Picture1.PaintPicture Picture2.Picture, 0, 0, Picture1.Width, Picture1.Height
End Sub
-
Aug 14th, 2000, 01:09 PM
#5
Thread Starter
Lively Member
Thanks everyone...
...everything seems to be working now, thanks for all the help
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|