简体   繁体   English

在Java中打开应用程序最小化

[英]open an application minimize in java

I'm trying to open a PowerPoint file from a Java program using this method 我正在尝试使用此方法从Java程序打开PowerPoint文件

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: Windows中有一种方法可以在最小化状态下打开任何应用程序,使用此命令并将powerpoint exe和ur ppt文件作为和参数传递给start命令:

Command line version: cmd /c start /min POWERPNT.exe e:\\test.pptx 命令行版本: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"}); Java代码:Runtime.getRuntime()。exec(new String [] {“ cmd”,“ / c”,“ start”,“ / min”,“ POWERPNT.exe”,“ e:\\ test.pptx”}) ;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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