[fpc-pascal] Executable with invisible window and IO enabled

Michael Van Canneyt michael at freepascal.org
Tue Jul 16 10:10:07 CEST 2013



On Mon, 15 Jul 2013, luciano de souza wrote:

> hello all,
> I want to compile a program with no visible screen, but at the same
> time, with input and output enabled.
> If I use $apptype gui, the screen is invisible, but there are not
> input and output.

Correction: there is input and output, just not standard input and output.
(the console, if you want)

> If I use the standard $apptype console, the input and output is
> enabled, but the screen is visible.
> In Windows, how to obtain the both effects simultaneously?
> Brook has an embeded web server. With one click on the executable, the
> web server is opened. However, it's not my intention to keep the
> window visible. Otherwise, the browser will read data from the input
> and write data to the output.

It should not. A webserver reads/writes to port 80.

If it reads/writes to standard input/output, it only diagnostic information.

You should compile this app with $apptype GUI, and disable all diagnostic information
(i.e. comment out all writeln statements)

Michael.



More information about the fpc-pascal mailing list