Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Class ProgressIndicator FAW
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows 2000 SP4
Database:
Visual FoxPro
Divers
Thread ID:
01019151
Message ID:
01042006
Vues:
23
On the development computer the COM server is registered (happens when you rebuild it in Visual FoxPro. When distributing the exe, as Sergey pointed out, you will need to register the COM server. This can be done from the MSDOS prompt with something like the following (you will either need to CD to the directory or put in the full path to the COM server)...

C:\VfpMyApp\meprogress.exe /RegServer

...you could also do this from within your VFP application using the RUN command... what you would do is basically trap for an error and try and instantiate the progressindicator class. If it fails then register it, if not then release it and proceed into your application. There are other ways, but these are two of the simplest to get you past the problem you are encountering. Great to hear that you are using the progressbar class... I've found it works good for a number of my Visual FoxPro projects.

>Hello Craig,
>
>Your solution worked well in captivity (development), but it is throwing an error for me when released in the wild (production). On the development computer, I guess it's finding the .FXP and using that.
>
>>Take that class (making sure it is OLEPublic still) and place it into a prg file in a seperate empty project. Then, compile your new project as a COM Server (EXE) in VFP.
>
>Confirmed, done as instructed.
>
>>So, let's say your COM Server exe is named "progress.exe"... then you can instantiate it from your main application using loProgress = CreateObject("Progress.ProgressIndicator") - the code from your main application is little different than what you have now except for this change in how it gets instantiated.
>
>Here is my calling code:
>LOCAL loProgress
>loProgress = CREATEOBJECT("MEprogress.ProgressIndicator") && ERROR HERE
>loProgress.setup("Selecting Data for Sample Workorders...", 1, 1, 0, .T., .F.)
>loProgress.show()
>When running in production, the COM server MEprogress.exe resides in the same folder on the network drive that the calling application is in.
>The error message is: "Class definition MEPROGRESS.PROGRESSINDICATOR is not found."
>
>SET OLEOBJECT is at default. Should I explicitly set it ON?
>Your additional help will be much appreciated.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform