Minimize VS Main window on non-debug launch
-
Is there a way to set VS to aut-minimize itself when non-debug launching an exe? Thx
-
Is there a way to set VS to aut-minimize itself when non-debug launching an exe? Thx
Not that I've found.
A guide to posting questions on CodeProject
Click this: Asking questions is a skill. Seriously, do it.
Dave Kreskowiak -
Is there a way to set VS to aut-minimize itself when non-debug launching an exe? Thx
I guess you want a setting which causes that for any project: here, I do not know a solution. But when it comes to a specific project, I guess there is a way. Look at the Properties page of the project, select Debugging. Typically, the "start action" is "start project". You could change that to "start external program" and point it to a program which minimizes VS and then starts the project. Since settings can be different depending on the selected configuration, that could be possible. (Note: I do not know the "correct" english names of the menus/tabpages as I have to use German localized VS, and tried to translate the items back from German to English)
-
Is there a way to set VS to aut-minimize itself when non-debug launching an exe? Thx
-
Why would you want to? Whether you run the debug or non-debug version, it is still useful to have VS visible to see any messages that may show up. If you want to run the non-debug version totally stand-alone then don't launch it from Visual Studio.
See my self-answer (in a moment or so)...
-
Is there a way to set VS to aut-minimize itself when non-debug launching an exe? Thx
Someone asked why I would want to do this. I have both IT and non-IT staff come to my desk to do informal reviews, of which the .exe is launched from VS. We review, jump back into VS to make changes, then relaunch. Having the VS window auto-minimize speeds the process along (yeah, first-world problem...). I have derived what I am confident is a simple, workable [yet, untested] solution. All my .exe's reference a core DLL which contains this enum and is used to perform specific functions given the focus.
AppModeEnum
{
Debug,
Test,
Production
}I'll add "Review" between Debug & Test (the order doesn't matter, they show up alphabetical anyway) and add a function
InvokeReviewMode
in the core DLL (can now be used in any .exe) to useWindowManager
calls to walk through all open exe windows, minimize them (keeping track of theirWindowState
), except for the executing app's window. On close, all minimized windows at launch will be restored to their prevWindowState
(if they still exist).