简体   繁体   中英

open an application minimize in java

I'm trying to open a PowerPoint file from a Java program using this method

Desktop.getDesktop().open(new File(pPTFile));

it's opening on maximum size but I want to open it minimize

Any ideas ?

There is a way in windows to open any application in the minimized state, use this command and pass the powerpoint exe and ur ppt file as and argument to the start command:

Command line version: cmd /c start /min POWERPNT.exe e:\\test.pptx

Java code: Runtime.getRuntime().exec(new String[]{"cmd","/c", "start", "/min", "POWERPNT.exe", "e:\\test.pptx"});

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM