I have a C# winform application that is compiled twice.
First time to run in FULL SCREEN mode
Second time to run in normal size mode; within the size of the winform.
Currently each compilation is in its own folder.
What I need is to compile these 2 versions into one/same folder. So the files GUI.exe and GUI-FULL_SCREEN.exe would be in the same folder.
What I’ve tried:
- first I compiled normal mode application with assembly name as GUI.exe
- then I changed the assembly name to GUI-FULL_SCREEN.exe (in Application properties/Application/Assembly name) and compiled it into the same directory. This removed the first assembly GUI.exe and created new one GUI-FULL_SCREEN.exe instead.
What I want to achieve is that GUI.exe and GUI-FULL_SCREEN.exe would stay in the same directory.
Thank you for your help.
You could use command line arguments to switch this setting and create just a shortcut instead of a new exe file.
For example if fullscreen is passed start the app as full screen, otherwise in normal mode.
You could use Environment.GetCommandLineArgs to get the arguments.
Then just create a shortcut to your exe file, call it GUI-FULL_SCREEN and start the app with the required parameter: ‘”.\GUI.exe” /fullscreen’