Saving An Image

scott93727

Member
Licensed User
Longtime User
What the right code to use to save an image with the dialog, tried below but doesn't work.
Thanks
Scott


Sub imsav_Click
saveDialog1.Show
ErrorLabel(err6)
FileOpen(c1,savedialog1.file,cWrite)
FileWrite(c1,image1.Image)
FileClose(c1)
Goto send6:
err6:
Msgbox("Not a supported file Type.")
send6:

End Sub
 

specci48

Well-Known Member
Licensed User
Longtime User
Hello Scott93727,

you should use the ImageLibEx library to save an image to a file.
Have a look at the help topic BitmapEx.



specci48
 

Zenerdiode

Active Member
Licensed User
Your error handling code is not quite written as intended either.
You should remove the 'Goto send6:' labels and place a 'Return' statement before your error handling label & code.
 
Top