Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Creating a minimal program
Message
De
27/01/2004 14:23:41
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00870812
Message ID:
00871077
Vues:
19
>set exclusive off
>set lock on
>set multilocks on
>set refresh to 5
>set reprocess to 15 seconds
>=MESSAGEbox('before form')
>do form test1rskexp2 [modal form]
>=MESSAGEbox('after form')
>read events
>=MESSAGEbox('after read events')
>CLEAR events
>
>close all
>close databases ALL
> >quit
>
>This is the main.prg [set main] - when converted into an EXE it runs and displays the first two messages, but nothing else displays, program is listed as still runnning -- CTRL+ALT+DEL cancels the program, but then that changes to 'Visual FoxPro' in the task list, and that has to be CTRL+ALT+DELeted.

This will work:
* Code for the main.prg
set exclusive off
set lock on
set multilocks on
set refresh to 5
set reprocess to 15 seconds
_Screen.Show()
=MESSAGEbox('before form')
do form test.scx
READ EVENTS
=MESSAGEbox('after form')
=MESSAGEbox('after read events')

close all
close databases ALL

quit

Then put a CLEAR EVENTS command in the destroy method of the form.

You need to make the Main FoxPro screen visible. That's what the _Screen.Show() call does. Take the CLEAR EVENTS and put it in the destroy method of the form, so the program will wait for events until you close the form.

HTH
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform