This is the code that I use on a save button in an acces form with the active x. I want to save the picture after a modification:
Private Sub SaveImage_Click()
Dim sImageString As String
Dim strLinkedDoc
strLinkedDoc = Me.Linked_Doc
MsgBox strLinkedDoc
Select Case right(Me.Linked_Doc, 3)
Case "gif"
sImageString = oGdPicture.SaveAsString("gif")
oGdPicture.CloseImage (OgdViewer.GetNativeImage())
oGdPicture.LoadFromString (sImageString)
oGdPicture.SaveAsGif (strLinkedDoc)
Case "bmp"
sImageString = oGdPicture.SaveAsString("bmp")
oGdPicture.CloseImage (OgdViewer.GetNativeImage())
oGdPicture.LoadFromString (sImageString)
oGdPicture.SaveAsBmp (strLinkedDoc)
Case "jpg"
MsgBox "jpg"
sImageString = oGdPicture.SaveAsString("jpg")
oGdPicture.CloseImage (OgdViewer.GetNativeImage())
oGdPicture.LoadFromString (sImageString)
oGdPicture.SaveAsJpeg (strLinkedDoc)
Case "peg"
sImageString = oGdPicture.SaveAsString("jpg")
oGdPicture.CloseImage (OgdViewer.GetNativeImage())
oGdPicture.LoadFromString (sImageString)
oGdPicture.SaveAsJpeg (strLinkedDoc)
Case "tif"
sImageString = oGdPicture.SaveAsString("tif")
oGdPicture.CloseImage (OgdViewer.GetNativeImage())
oGdPicture.LoadFromString (sImageString)
oGdPicture.SaveAsTiff (strLinkedDoc)
Case "wmf"
sImageString = oGdPicture.SaveAsString("jpg")
oGdPicture.CloseImage (OgdViewer.GetNativeImage())
oGdPicture.LoadFromString (sImageString)
oGdPicture.SaveAsJpeg (strLinkedDoc)
MsgBox "Converti en Jpeg"
Case Else
MsgBox "Format d'image invalide"
OgdViewer.ClosePicture
End Select
End Sub
Would you tell me why it doesn’t work? Also why Is it telling me that I use a not registered version when on the load event of my form I have enter the proper serial number
