Picturebox & StretchBlt
- From: "Ivan Debono" <ivanmdeb@xxxxxxxxxxx>
- Date: Thu, 11 Jan 2007 13:11:57 +0100
Hi all,
I've got this code:
Dim lWidth As Long
Dim lHeight As Long
Dim myPicture as StdPicture
myPicture.LoadPicture "somepicture"
pbxPicture.Picture = myPicture
If Not myPictureIs Nothing Then
lWidth = pbxPicture.ScaleX(myPicture.Width, vbHimetric, vbPixels)
lHeight = pbxPicture.ScaleY(myPicture.Height, vbHimetric, vbPixels)
SetStretchBltMode pbxThumb(0).hdc, HALFTONE
StretchBlt pbxThumb(0).hdc, 0, 0, 64, 64, _
pbxPicture.hdc, 0, 0, pbxPicture.ScaleWidth,
pbxPicture.ScaleHeight, SRC_COPY
End If
The code should load a picture in original size in the pbxPicture and a
thumbnail copy in the pbxThumb(0). The pbxPicture works fine, but the
thumbnail picturebox remains empty.
Any ideas?
Thanks,
Ivan
.
- Follow-Ups:
- Re: Picturebox & StretchBlt
- From: Mike D Sutton
- Re: Picturebox & StretchBlt
- Prev by Date: Re: Resource Management -- Preventing Crashes
- Next by Date: Re: Picturebox & StretchBlt
- Previous by thread: Resource Management -- Preventing Crashes
- Next by thread: Re: Picturebox & StretchBlt
- Index(es):
Relevant Pages
|