title: Console+GUI application using input arguments
body: <p>I have a question that I think is harder to explain than to answer... I'll try.</p>
  
  <p>There are several softwares that can be run on terminal with various input arguments (-h, -a, ...), and where one of these arguments runs the software GUI. At the moment, no real software came up to my mind, sorry... Let's use <code>my_software</code> as an example</p>
  
  <pre><code>&gt; my_software -h
  This is my_software version 1.0
  Options:
  -h    Display this help
  -a    Do processing 1
  -b    Do processing 2
  -g    Start software GUI
  </code></pre>
  
  <p>So, if I call the software from console, I can let it do processing 1 or 2 via ad input argument. Also, I can start its astounding GUI using <code>-g</code>, and do processing 1 or 2 using buttons or whatever else.</p>
  
  <p>Question: How to achive such a thing?</p>
  
  <p>I've seen some solutions in MS forums (I'm working with C++ and VIsual Studio at the moment, but a "generic" approach hint will be ok), where one creates a Form application but start as command line, and open the form with a given command. Seems ok. Only question: in this case, after startup, are both console and GUI visible or just the selected one?</p>
  
  <p>What I want is also to be able to reproduce the behaviour of the GUI using command line arguments, so every button/function of the GUI can be reproduced using a command line argument. This, mainly, to be able to automate some tests of the GUI events. Side question: does it make any senses?</p>
  
  <p>I think there are some MVC design involved. Program functionality is separated from user interface, so Console and GUI can make the same controller calls. I'm not very familiar with MVC, but I think that it is involved in this case. Right?</p>
  
  <p>I hope that everything is clear.</p>
  
  <p>Thanks for your help!</p>
  
  <p>MIX</p>
  
  <p>EDIT: a good example can be VLC. It starts with its well known GUI, but it can be used from console, too (<a href="https://wiki.videolan.org/VLC_command-line_help/" rel="nofollow">https://wiki.videolan.org/VLC_command-line_help/</a>). </p>