Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Compiled EXE just flashes and exits when run.
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01123598
Message ID:
01123631
Vues:
17
>Ok, for me this is a real head banger.
>
>I have a small program that runs fine from the command prompt but when compiled the EXE just flashes and exits.
>
>The program has only one Modal form. The form has a timer that runs a prg to do some stuff. There is no menu and only an edit box with a scrolling log and a cancel button.
>
>What is so strange is that I have another exe that is very similar that has been working for years. I even tried using the form from that project in this one. Same result. Before I really start tearing my project apart does anyone have any ideas as to where I went wrong?
>TIA

After you call your modal form, are you placing the READ EVENTS command to tell the application to start listening to Events? In some cases, depending on where you are executing code in the scheme of an application FoxPro doesn't stop when displaying a form, even if modal. From your main startup method, immediately after you load your form, insert the READ EVENTS command. This will tell FoxPro to place a "Block" of sorts on the code execution of that method, and allows the form you instantiated to display and have it's event's processed. When you close the last form from memory, you should execute the CLEAR EVENTS command, which tells FoxPro to continue executing code starting from the previous "READ EVENTS" position. This allows the application to exit properly.
________________________
Ben Santiago, MCP & A+
Programmer Analyst (SQL, FoxPro, VB, VB.Net, Java, HTML, ASP, JSP, VBS)
Eastern Suffolk BOCES - Student Data Services


Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
-Rich Cook
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform