LoadFromFiles Method

Discussions about GdPicture.NET usage in non managed applications built in vb6, Delphi, vfp, MFC c++ etc...
Post Reply
User avatar
DMI
Posts: 6
Joined: Fri Dec 14, 2012 12:05 pm
Location: Germany

LoadFromFiles Method

Post by DMI » Mon Apr 08, 2013 2:36 pm

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)

Cedric
Posts: 269
Joined: Sun Sep 02, 2012 7:30 pm

Re: LoadFromFiles Method

Post by Cedric » Wed Apr 10, 2013 3:39 pm

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)

User avatar
DMI
Posts: 6
Joined: Fri Dec 14, 2012 12:05 pm
Location: Germany

Re: LoadFromFiles Method

Post by DMI » Thu Apr 11, 2013 8:29 am

thank you

User avatar
DMI
Posts: 6
Joined: Fri Dec 14, 2012 12:05 pm
Location: Germany

Re: LoadFromFiles Method

Post by DMI » Thu Apr 11, 2013 10:27 am

sorry it does not work :(
I get the message: OLE error code 0x80020005: Type mismatch.

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: LoadFromFiles Method

Post by Loïc » Thu Apr 11, 2013 4:31 pm

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

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest