Accusoft ImagXpress 12
CloseImage Method
See Also  Example  Send comments on this topic.
lImageID
Which image buffer to close.
AccusoftImagXpress12 ActiveX DLL > ImagXpress Object : CloseImage Method

Glossary Item Box

Description

Closes the specified image and frees up associated resources.

Syntax

Visual Basic
Public Sub CloseImage( _
   ByVal lImageID As Long _
) 

Parameters

lImageID
Which image buffer to close.

Remarks

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.

Example

 
Using CloseImage to handle multiple image buffers.
Using CloseImage. (Visual Basic)Copy Code
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

See Also

©2013. Accusoft Corporation. All Rights Reserved.