Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Set-up DDE client/server within Form's INIT Method
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Titre:
Set-up DDE client/server within Form's INIT Method
Divers
Thread ID:
00049262
Message ID:
00049262
Vues:
137
I am trying to enable asynchronous DDE comunications between my VFP5 app and a C program. I have succeeded with DDE between two VFP 'prg' files each running under a seperate Windows' session. I want to duplicate this using VFP SDI forms.

I have the following code in one of my Form's INIT Method:

* Set-Up Server
=DDESetService('VFP','DEFINE')
=DDESetService('VFP','EXECUTE',.T.)
=DDESetService('VFP','REQUEST',.T.)
=DDESetService('VFP','POKE',.T.)

* Set-Up our main topic and the UDF name that
* will handle the DDE message we are processing.

WITH This
.cItem = 'MYCMD'
= DDESetTopic('VFP',.cItem,'Thisform.dispatch')
* Become Client for C++ program
.nChannel = DDEInitiate('CPP',.cItem)
ENDWITH

When I run the form, I get an error while the program tries to execute the command :

= DDESetTopic('VFP',.cItem,'Thisform.dispatch')

For some reason, VFP doesn't recognize 'Thisform.dispatch' as a valid UDF which is meant to be executed when the Server sends data back to the form.

I need to initialize DDE comunication from within a form so that I can display data sent to me from the DDE Server.

What to do?

Any help is appreciated...
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform