Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating a minimal program
Message
From
27/01/2004 14:23:41
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00870812
Message ID:
00871077
Views:
18
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform