Hi fellow programmers,
I tried to address this problem in another thread already but I guess it got too far down...
Basically what I am trying to compile is a single .exe application that runs both 1) as a windows and 2) as a console application. When the users starts the application with the mouse Form1 should appear; when he/she starts over the console, that window should *not* appear.
I got everything ready so far (thanks at this point to some of you guys); two classes, one for the form startup and one for the console startup. Through the project's properties I can assign one of these classes to be the start object. Here is the problem:
- When I define the Form class as start object, the form window will popup even when the program is started over the console.
- Defining the "console start" class as the start object, I need to code something to seperate between a start through the console or through windows. The problem: Even when the user starts the application with the mouse, the console window will appear as well! (since it is the start object). I tried different methods to close that console window but no luck yet (without shutting down the whole application)...
I'm not sure where to go from here? Does anyone have a hint for me?
I tried to address this problem in another thread already but I guess it got too far down...
Basically what I am trying to compile is a single .exe application that runs both 1) as a windows and 2) as a console application. When the users starts the application with the mouse Form1 should appear; when he/she starts over the console, that window should *not* appear.
I got everything ready so far (thanks at this point to some of you guys); two classes, one for the form startup and one for the console startup. Through the project's properties I can assign one of these classes to be the start object. Here is the problem:
- When I define the Form class as start object, the form window will popup even when the program is started over the console.
- Defining the "console start" class as the start object, I need to code something to seperate between a start through the console or through windows. The problem: Even when the user starts the application with the mouse, the console window will appear as well! (since it is the start object). I tried different methods to close that console window but no luck yet (without shutting down the whole application)...
I'm not sure where to go from here? Does anyone have a hint for me?