[Qt-interest] Opening Console app in Minimized mode
Ian Clark
mrrooster at gmail.com
Tue Jan 25 15:41:00 CET 2011
On 24 January 2011 10:38, Shrenik Shah <shrenik_shah at ovi.com> wrote:
> Hi All,
>
> We are working on a Qt Application in windows environment.
>
> We have a Qt based console application (MS Visual Studio 2k8) which launches few windows along with the console window.
>
> Can someone help to figure out how to have the console window launched minimized during application startup?
>
I'm unsure how to do it programatically, but you can create a shortcut
to your app and specify that the app should start minimised in the
shortcut properties dialog.
Or you could use a .bat file to start your app, and use the start command, eg:
start /min someapp.exe
which should run someapp.exe with an initially minimised window.
The only problem is you'll briefly see a command window flash up, this
can be avoided by using a small vb script.
Put the following in a file called run.vbs:
<---- cut
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run "%windir%\system32\cmd /c start /min cmd", 0
Set WshShell = Nothing
<---- cut
Then double clicking run.vbs will launch your program, in this case a
command window.
Hope that's some use,
Ian
More information about the Qt-interest-old
mailing list