-
Hi Guys (again :)
Sorry, here's what I want to do...
Load an image, resize it, save out the thumbnail, now to me this seemed like a trvial task indeed... So why doesn't the savepicture work after the image has been scaled ?
I works perfectly, If i save the picturebox before the scale....... I'm sorry i'm new to VB, but have spent half my life working in 680x0 asm on Amiga's, sigh I just don't get this (i have a list a mile long..of things i don't understand about VB)..
Picture1.Visible = False
Picture1.Picture = LoadPicture(sFile)
Dim Width As Integer
Dim Height As Integer
Width = 200
Height = 100
' ' Set pictures box to pixels
Picture1.ScaleMode = 3
Picture2.ScaleMode = 3
Picture2.PaintPicture Picture1.Picture, 0, 0, Width, Height, 0, 0, Picture1.ScaleWidth, Picture1.ScaleHeight
SavePicture Picture2.Picture, "D:\TestSave.bmp"
-
If you have autoredraw set to true on anything, you must refresh the picture before you can use savepicture.
(it's a nightmare!!!)
But VB is fun all the same, once you get the hang of it.
Listen to the good people: Kedaman, Megatron, Fox, SteveCRM, and even me :)
Lots of people here know a lot so help him out people!
-
Sorry guys,
Never mind I just worked it out, If I enable Auto Redraw on picturebox 2 it now works fine........... Even makes sense :)
-
Sastraxi,
Thanks man, I appreciate your help a great deal !!.
I'm starting to get the hang of this... it's just taking a while... :(