Re: Console and Form together in one application based on EXE parameters



Jamie wrote:
i found in the past if you start with a console app and then include a
Tform class and dynamicly create it on start up, you can have both
the console and VCL :))

I frequently use that technique when debugging. However, Ajo wants one or the other, but not both simultaneously.

If he starts with a console program, then he can call FreeConsole to get rid of the console window afterward, but there's still an unsightly flicker as the OS creates the window but before the application has a chance to remove it.

If he starts with a GUI program, then he can use AllocConsole to get a new console window, but he wants to inherit the use of the existing console window, if there is one. He can do that with AttachConsole, but I already described the problem with that.

--
Rob
.



Relevant Pages