Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Supressing user interface
Message
De
01/11/2013 16:15:47
 
 
À
01/11/2013 08:54:34
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01587079
Message ID:
01587128
Vues:
95
>Hi, I need to run a VFP App in "batch mode", is there any "simple" way to supress user interface dialogs? I mean, to supress the display of messageboxes, wait Windows without having to rewrite the whole App?

Some changes will likely be required:

1. Change your MAIN program to accept one (or more) parameters e.g.
* Main.prg
LPARAMETERS tcBatchMode

LOCAL llBatchMode

IF PCOUNT( ) < 1
  * No parameters passed:
  llBatchMode = .F.

ELSE
  llBatchMode = ( UPPER( tcBatchMode ) == "T" )

ENDIF

* Later on save the value of llBatchMode to a global property or value
2. You can then start your EXE with an optional parameter:
* Start in batch mode
MyEXE.EXE T

* Start in interactive mode
MyEXE.EXE F

* No passed parameter also results in interactive mode
MyEXE.EXE
3. Within your application you would need to wrap all dialogs e.g.
IF NOT llBatchMode
  * Do your dialog stuff here

ENDIF
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform