Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
RUN command
Message
From
18/05/2004 11:21:51
 
 
To
18/05/2004 10:51:13
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, United States
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00904937
Message ID:
00904955
Views:
27
>Hello,
>In my application I am running a .bat file with this command:
>
>Run C:\vfp\ka\Runtime\clearwork.bat
>
>
>Is there a way to specify this to run minimized so the black screen does not pop up when the .bat file is run?
>
>Thanks!
>
>MACM


You can use WinAPI:
function ShellExec(tcFileName,tcParameters,tcWorkDir,tcOperation)
   declare integer ShellExecute ;
      in SHELL32.dll ;
      integer nWinHandle,;
      string cOperation,;
      string cFileName,;
      string cParameters,;
      string cDirectory,;
      integer nShowWindow
   return ShellExecute(0,lcOperation,lcFileName,lcParameters,lcWorkDir,0)
or WSH:
#define SW_SHOW_NORMAL 1
#define SW_SHOW_MINIMIZED 2
#define SW_SHOW_MAXIMIZED 3
oShell = createobject("WScript.Shell")
oShell.Run("C:\vfp\ka\Runtime\clearwork.bat",SW_SHOW_MINIMIZED,.T.)
HTH


Alex Feldstein, MCP, Microsoft MVP
VFP Tips: English - Spanish
Website - Blog - Photo Gallery


"Once again, we come to the Holiday Season, a deeply religious time that each of us observes, in his own way, by going to the mall of his choice." -- Dave Barry
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform