|
-
Jan 6th, 2005, 04:21 PM
#1
Thread Starter
Lively Member
Displaying .png graphics in picturebox
Hi guys, have a problem here.I just need my Loadpicture() to be able to display .png pictures...is there a standard short code which i can just put in in front of my Loadpicture command?
-
Jan 6th, 2005, 04:30 PM
#2
Thread Starter
Lively Member
Re: Displaying .png graphics in picturebox
This is my code for displaying the picture,
'Create picturebox for graphical result
Set imgBOX.Picture = LoadPicture("C:\Documents and Settings\vb.jpg")
PicBOX.AutoRedraw = True
scrVERT.Max = ScaleY(imgBOX.Picture.Height, vbHimetric, vbPixels) - ScaleY(PicBOX.ScaleHeight, vbTwips, vbPixels)
scrHOR.Max = ScaleX(imgBOX.Picture.Width, vbHimetric, vbPixels) - ScaleX(PicBOX.ScaleWidth, vbTwips, vbPixels)
'just setting these to larger values to have faster scroll
scrVERT.SmallChange = 50
scrVERT.LargeChange = 100
scrHOR.SmallChange = 50
scrHOR.LargeChange = 100
'paint the top left of the picture to the size of the picture box
PicBOX.PaintPicture imgBOX.Picture, 0, 0, PicBOX.ScaleWidth, PicBOX.ScaleHeight, 0, 0, PicBOX.ScaleWidth, PicBOX.ScaleHeight
How do I modify this so that instead of vb.jpg I cna load vb.png?
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
|