MS Document Image [Anyone have a clue?]
Does any one know anything about this control. It seems pretty straight forward to use but I am running into a problem with getting the program to let go of the reference. I display the image, the user gets info from it and then deletes the image from the queue. Here is some code that I have hacked together to show the problem. The original source is far to large to post here. Anyway when I try to delete the file I get an "Access Denied" error. The only thing that I can come up with is that the program still has the file locked but I can't figure out were or how. Any help would be greatly appreciated.
Code:
Private tif As New MODI.Document
Private temp As String
Private Sub Command1_Click()
'Get file with CommonDialog control
cd.ShowOpen
temp = cd.FileName
tif.Create temp
'Send image to the Image Viewer
iv.Document = tif
End Sub
Private Sub Command2_Click()
Dim fso As New FileSystemObject
tif.Close
iv.FileName = ""
Set tif = Nothing
If fso.FileExists(temp) Then
fso.DeleteFile temp, False
End If
End Sub