Page 1 of 1

LoadFromFiles Method

Posted: Mon Apr 08, 2013 2:36 pm
by DMI
hello

Can you give an example of using the method for FoxPro ThumbnailEx.LoadFromFiles

I get constantly the error "Wrong parameter"

The folder contains up to 5000 files, but I only want to use a part of these. So the method LoadFromDirectory doesnt suit.

Code: Select all

DIMENSION MyResult(2,2)	&&Array erstellen
STORE "C:\TEMP\#BancTec\test\01\00000001.jpg" TO MyResult(1,1)
STORE "jpg" TO MyResult(1,2)
STORE "C:\TEMP\#BancTec\test\02\00000002.tif" TO MyResult(2,1)
STORE "tif" TO MyResult(2,2)

THISFORM.thumbnailEx1.LoadFromFiles(MyResult)

Re: LoadFromFiles Method

Posted: Wed Apr 10, 2013 3:39 pm
by Cedric
Hello,

The problem is you're passing a two dimensional array to the LoadFromFiles method where it should be a single dimension array.
You should try with something more like this:

Code: Select all

DIMENSION MyResult(2) &&Array erstellen
STORE "C:\TEMP\#BancTec\test\01\00000001.jpg" TO MyResult(1)
STORE "C:\TEMP\#BancTec\test\02\00000002.tif" TO MyResult(2)
THISFORM.thumbnailEx1.LoadFromFiles(@MyResult)

Re: LoadFromFiles Method

Posted: Thu Apr 11, 2013 8:29 am
by DMI
thank you

Re: LoadFromFiles Method

Posted: Thu Apr 11, 2013 10:27 am
by DMI
sorry it does not work :(
I get the message: OLE error code 0x80020005: Type mismatch.

Re: LoadFromFiles Method

Posted: Thu Apr 11, 2013 4:31 pm
by Loïc
Hello,

I don't know how to pass string array from vfp to COM methods taking such parameter. Also I am not sure it is possible.
Anyway, since this question is not really related to GdPicture component but more about vfp programming I think you will ave better help by asking the question on a vfp community forum.

I am sorry, but this is all I can tell so far (despite my 5 years of intensive vfp programming).

Kind regards,

Loïc