Problem with saving pictures with GflAx [VB]
Posted: Sat Dec 06, 2003 2:25 am
I have problems with trying some code to save a picture from a standard picturebox in VB. It crashes when I ultimately want to save the file. The code I use is as follows (where picturebox is the standard picturebox on the form that holds the image):
m_strFileName = "D:\Test\Block.jpg"
Dim Myobj As GflAx193.GflAx
Set Myobj = New GflAx193.GflAx
Myobj.SaveFormat = AX_JPEG
Myobj.SetPicture pictureBox
Myobj.SaveBitmap m_strFileName ' this is the code that fails
Set Myobj = Nothing
What am I doing wrong or do you know what's going on?
Erik
m_strFileName = "D:\Test\Block.jpg"
Dim Myobj As GflAx193.GflAx
Set Myobj = New GflAx193.GflAx
Myobj.SaveFormat = AX_JPEG
Myobj.SetPicture pictureBox
Myobj.SaveBitmap m_strFileName ' this is the code that fails
Set Myobj = Nothing
What am I doing wrong or do you know what's going on?
Erik