Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Call Java program without showing Windows' CMD window
Message
From
20/01/2017 18:06:06
 
 
To
20/01/2017 16:13:12
General information
Forum:
Visual FoxPro
Category:
Web Services
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Miscellaneous
Thread ID:
01646928
Message ID:
01646931
Views:
65
Likes (1)
there is for sure RUN options in Java to dont see the cmd window (invisible).

in scripting from vfp :
local oshell
oshell=newObject("wscript.shell")
oshell.run("cmd.exe",0)   && 0 want to say hidden window 
oshell=null
read:http://ss64.com/vb/run.html

in pure vfp APIs
constants:
0 Open the application with a hidden window.
1O pen the application with a normal window. If the window is minimized or maximized, the system restores it to its original size and position.
2 Open the application with a minimized window.
3 Open the application with a maximized window.
4 Open the application with its window at its most recent size and position. The active window remains active.
5 Open the application with its window at its current size and position.
7 Open the application with a minimized window. The active window remains active.
10 Open the application with its window in the default state specified by the application.
these constants can be found as #define.....
&&shellexecute
DECLARE INTEGER ShellExecute IN SHELL32.DLL INTEGER nWinHandle,;
                                            STRING cOperation,;
                                            STRING cFileName,;
                                            STRING cParameters,;
                                            STRING cDirectory,;
                                            INTEGER nShowWindow
*nShowCmd:Flags that specify how an application is to be displayed when it is opened.(values:0-10  see explanations above )

result = ShellExecute(0, "open", "cmd.exe","","",0)  &&0 hidden window see values above
note: a hidden window can be destroyed manually in taskmanager (open and termine) , by !TaskKill,....
Previous
Reply
Map
View

Click here to load this message in the networking platform