Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
I can't print directly to LPT1
Message
 
À
26/06/1997 09:42:03
Scott Knight
Human Resources Development Canada
St. John's, Terre-Neuve, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00037511
Message ID:
00037898
Vues:
32
> The following might be useful in keeping the run command window in the > background in Visual Foxpro: > > Do DosRun with "" > > FUNCTION DosRun > PARAMETER doscmd > > DECLARE INTEGER WinExec IN win32api AS run ; > STRING command, INTEGER param > > cmdstart = SYS(2004) + "FOXRUN.PIF /C " > fullcmd = cmdstart + doscmd > retval = run(fullcmd,0) > Return retval > > It may not be the most efficient but it works. Let's modify this just a bit to make it quite a bit more efficient and useful: Do DosRun with "" FUNCTION DosRun PARAMETER doscmd DECLARE INTEGER WinExec IN win32api ; STRING command, INTEGER param retval = WinExec(doscmd,2) Return retval If the return value is < 32, then an error happened. If it's >= 32, then you get the process number of the application that you started. '2' (in the WinExec call) is the translation for SW_MINIMIZE. HTH /Paul
Paul Russell
EMail: prussell@fox.nstn.ca
Phone: (902) 499-5043
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform