Loading...

Can't move image file after viewing

Support for GdPicture Light Imaging Toolkit and GdPicture Pro Imaging ActiveX/SDK.

Can't move image file after viewing

Postby jcooney » Thu Jul 02, 2009 9:43 pm

I have a VB program that displays images to the user and lets them associate it with a database record. That part works fine. My problem comes when I try to move the image file to another folder after the indexing is done. I get a Windows error "The process cannot access the file because it is being used by another process." The name of the Windows control is gdviewer1. I've tried putting gdviewer1.clear() and gdviewer1.CloseImage() just before the file.move statement and I still get the error. If I put a gdviewer.dispose() statement just before the file.move then the move works but, of course, the program dies because I killed the control.

Is there something I'm missing?

Here's the code segment that's failing:

Code: Select all
    Dim ImageIdx As Integer
    Dim DirList As DirectoryInfo
    Dim FileList() As FileInfo
    Dim QueueList() As DirectoryInfo
    Dim ImageRootIn As String = "", ImageRootSave As String = "", FPath As String = ""
.
.
.
            ThisImageFile = FPath + CB_WorkingQueue.Text & "\" + FileList(ImageIdx).Name
            GdViewer1.CloseImage()
            GdViewer1.Clear()
            File.Move(ThisImageFile, ImageRootSave + FileList(ImageIdx).Name)


The stranger thing is that this code worked fine with the evaluation copy of gdpicture.
jcooney
 
Posts: 1
Joined: Fri Jun 26, 2009 9:08 pm

Re: Can't move image file after viewing

Postby Loïc » Thu Jul 02, 2009 9:53 pm

Hi,

We can't reproduce your problem with the code you wrote.

Please: Check you are using the latest available edition. You can get it from http://www.gdpicture.com/download/downl ... urepro.php

If your problem persists, try to give us a standalone procedure which reproduce the behavior.

With bet regards,

Loïc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4430
Joined: Tue Oct 17, 2006 10:48 pm
Location: France


Return to GdPicture [Pro] ActiveX

Who is online

Users browsing this forum: No registered users and 3 guests

cron