F
ffimbel
Hi
I would like to implement a single exe which could be invoked either
as a standard windows form (no argument) or as a console app (when run
with app.exe -nologo).
I tried compiling the exe as a winform app and use win32 app to create
a console but when launched from a dos command line, it does not use
the launching console but create a new one
[DllImport("kernel32.dll")]
public static extern Boolean AllocConsole();
[DllImport("kernel32.dll")]
public static extern Boolean FreeConsole();
I also try compiling directly as command line app but in that case the
console stay in the background when launched as a standard window app.
Thanks in advance for any help.
I would like to implement a single exe which could be invoked either
as a standard windows form (no argument) or as a console app (when run
with app.exe -nologo).
I tried compiling the exe as a winform app and use win32 app to create
a console but when launched from a dos command line, it does not use
the launching console but create a new one
[DllImport("kernel32.dll")]
public static extern Boolean AllocConsole();
[DllImport("kernel32.dll")]
public static extern Boolean FreeConsole();
I also try compiling directly as command line app but in that case the
console stay in the background when launched as a standard window app.
Thanks in advance for any help.