Outline ·
[ Standard ] ·
Linear+
Save Picture In VB6, can't really figure it out
TSatria83
|
Feb 20 2006, 10:39 PM, updated 19y ago
|
Getting Started
|
This is partial of my program so far...try to save image generated into the database...somehow...the path of picture can be easily stored..but the problem...is at the picture...it won't save....
'FileSave Picture1 picName = tbProdID.Text file_name = App.Path & "\img\" If Right$(file_name, 1) <> "\" Then file_name = _ file_name & "\" 'save picture problem could not be settle ' | <--- used this command..but came out error... ' V SavePicture Picture1.Picture, file_name & picName & ".bmp" rs("barcode") = App.Path & "\img\" & picName & ".bmp"
so...anyone had any ideas on how to do this..??please...been stuck for sometimes...
|
|
|
|
TSatria83
|
Feb 21 2006, 12:48 AM
|
Getting Started
|
the picture going to be saved on diff folder...only the path be saved into the database....problems is...can't really figure out about the function SavePicture...
|
|
|
|
nxfx
|
Feb 21 2006, 08:34 AM
|
|
Make sure the path exist and correct. Whats the error btw?
|
|
|
|
TSatria83
|
Feb 21 2006, 06:22 PM
|
Getting Started
|
hmm..the path got no problem....somehow..the picture generated in VB cannot be save...been searching that i need to used the SavePicture function..but it still won't work...so any idea...??
|
|
|
|
AaronZe
|
Feb 21 2006, 06:30 PM
|
Getting Started
|
I am not sure whether this works >>> Click here
|
|
|
|
SincerePrayer
|
Feb 21 2006, 08:04 PM
|
love to pray
|
atria83, What is the actual error message you are getting? Perhaps you might want refer the sample code hereHappy Coding
|
|
|
|
ashow
|
Feb 22 2006, 08:39 PM
|
New Member
|
1 of the solution is convert the pic to binary code/string then store the it at database.
i can give u the sample code if u need it
|
|
|
|
TSatria83
|
Feb 22 2006, 09:52 PM
|
Getting Started
|
thanks to all respons...really appriciate it..but my idea is like this...the picture are going to be saved into one folder...while the image path are store into the database...so when ever i try to recall back the image..i just query the image path...and VB diplay back the image base on path that are stored in my database... somehow..the problem is...when ever the barcode image are generated(it's not save yet)..without using the SavePicture command..i can save the path of picture into the database...but there is no picture save into the folder that i assign to save generated barcode..
|
|
|
|
nxfx
|
Feb 23 2006, 08:35 AM
|
|
Have you set the autoRedraw to True and try using Picture1.image.
|
|
|
|
TSatria83
|
Feb 23 2006, 02:18 PM
|
Getting Started
|
hmm..i'm gonna try it...anything i will post back....thanks nxfx
|
|
|
|