Upgrading to GdPicture.Net

Discussions about machine vision support in GdPicture.
Post Reply
ronk
Posts: 10
Joined: Wed Aug 29, 2012 7:53 am

Upgrading to GdPicture.Net

Post by ronk » Wed Aug 29, 2012 8:10 am

I work for a client who used GdPicturePro5 in Visual Foxpro. They have existimg lines of code that work fine with the version 5 but the second line fails as being an invalid class when I use the new version demo. The lines of code are (the word gdpicturepro5 has been changd to gdpicture9 represent the new version):

Thisform.AddObject("olecontrol1", "olecontrol", "GdPicture9.GdViewer")
Thisform.AddObject("olecontrol2", "olecontrol", "gdpicture9.Imaging")

the code then goes on and gives the licence numbers.

I have succefully run the vfp using com interop example on my computer. I have no experience at all with GdPicturePro and my client is wanting to update to the latest version. Can you suggest what I am going wrong? Any help would be much appreciated.

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

Re: Upgrading to GdPicture.Net

Post by Loïc » Wed Aug 29, 2012 9:44 am

Hello,

You have to change:

Code: Select all

Thisform.AddObject("olecontrol2", "olecontrol", "gdpicture9.Imaging")
by:

Code: Select all

Thisform.AddObject("olecontrol2", "olecontrol", "gdpicture9.GdPictureImaging")
That said, GdPicutre.NET 9 is a totally different product than GdPicture Pro 5. Therefore, there is no backward compatibility and the above modification should not be enough to port the app from v5 to v9.

Let me know if you need further information.

With best regards,

Loïc

ronk
Posts: 10
Joined: Wed Aug 29, 2012 7:53 am

Re: Upgrading to GdPicture.Net

Post by ronk » Wed Aug 29, 2012 10:36 am

Many thanks for your quick reply and appreciate your comments about compatibility. When I run your suggestion it says "Class not registered".

Since the project I am wanting alter is rather smal in terms of Gdpicture commands used, is there are quick way you can suggest for me to learn how to convert the old code to new where necessary? It has to be done in Visual Foxpro as it is part of a much larger program written in that language.

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

Re: Upgrading to GdPicture.Net

Post by Loïc » Wed Aug 29, 2012 9:11 pm

Hello,

Sorry here a good syntax:

Code: Select all

oGdPictureImaging = CREATEOBJECT("GdPicture9.GdPictureImaging")
Since the project I am wanting alter is rather smal in terms of Gdpicture commands used, is there are quick way you can suggest for me to learn how to convert the old code to new where necessary?
I can suggest to check our vfp9 sample provided in the package. If you need particular code snippet, just create a ticket on the code sample request section that you can find here: viewforum.php?f=29

Kind regards,

Loïc

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest