AccusoftImagXpress13 ActiveX DLL > ImagXpress Object : CloseImage Method |
Visual Basic |
---|
Public Sub CloseImage( _ ByVal lImageID As Long _ ) |
When processing multiple buffers, you must track them and close those buffers with which you are finished. The control will be blank.
If any control references an image buffer (either in ProcessImageID or ViewImageID properties), the control is not freed, but it does blank out.
Private Sub Command1_Click() Dim ImageBufferID As Integer Dim PrevID As Integer Dim i As Integer ' ACTIVE BUFFERS CAN NOT BE CLOSED SO WE HAVE TO CLOSE IT AFTER WE'VE STARTED WORKING WITH ANOTHER ONE. PrevID = IX.ProcessImageID ' SWITCH TO ANOTHER BUFFER ImageBufferID = IX.GetUniqueImageID IX.ProcessImageID = ImageBufferID IX.ViewImageID = ImageBufferID ' NOW IT IS OK TO CLOSE THE FIRST BUFFER IX.CloseImage (PrevID) ' OPEN ANOTHER IMAGE FILE IX.FileName = App.Path & "\benefits.tif" End Sub