Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
I can't print directly to LPT1
Message
From
27/06/1997 00:38:40
 
 
To
26/06/1997 09:42:03
Scott Knight
Human Resources Development Canada
St. John's, Newfoundland, Canada
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00037511
Message ID:
00037898
Views:
34
> 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
Previous
Reply
Map
View

Click here to load this message in the networking platform