Executable with invisible window and IO enabled

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Executable with invisible window and IO enabled

Luciano de Souza
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.
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. So, I really need invisibility and
enable IO.
Regards,
Luciano
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Executable with invisible window and IO enabled

Michael Van Canneyt


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.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Executable with invisible window and IO enabled

Graeme Geldenhuys-3
On 2013-07-16 09:10, Michael Van Canneyt wrote:
>
> You should compile this app with $apptype GUI, and disable all diagnostic information
> (i.e. comment out all writeln statements)


Exactly what Michael said. You can also enable you app to start-up in
the system tray. Not showing the main form by default.


Regards,
  - Graeme -


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Executable with invisible window and IO enabled

shiruba2012
Hi,

As an aside, back in my Delphi developer days, I noticed that you could use the console app type to compile GUI apps just fine, but that the console window would also pop up and you could use it to output quick and dirty debug messages with writeln.

The main thing that bothered me back then was that a lot of Delphi developers came from a VB background, and even instruction books recommended you do absurd things because that's how they did it in VB.  I remember one book recommending the following way to sort a list of strings:
1. Create an invisible list box on the window
2. Load it with the strings
3. Execute the sort method and then read the strings you want
Using window handles and all.... no wonder VB programs often used up all of the resources in older versions of Windows.
(Note: This way was much faster than implementing sorting yourself in VB, since the listbox code was written in C and executed much faster than your VB code would if you wrote the sorting routine yourself).


Thank you,
    Noah Silva


2013/7/16 Graeme Geldenhuys <[hidden email]>
On 2013-07-16 09:10, Michael Van Canneyt wrote:
>
> You should compile this app with $apptype GUI, and disable all diagnostic information
> (i.e. comment out all writeln statements)


Exactly what Michael said. You can also enable you app to start-up in
the system tray. Not showing the main form by default.


Regards,
  - Graeme -


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Executable with invisible window and IO enabled

Graeme Geldenhuys-3
On 2013-07-20 12:28, Noah Silva wrote:
> remember one book recommending the following way to sort a list of strings:
> 1. Create an invisible list box on the window

:-)  I'm still required to maintain a VB6 program that is full of such
sh*t. Hidden controls all over the place. :-/  That definitely was the
way VB developers coded though.


Regards,
  Graeme

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Executable with invisible window and IO enabled

Luciano de Souza
I thank you for the tip. That's true I haven't tested it up to now.
The Windows was damaged by 194 infections. this large amount of virus
has blocked the browsers and, as a result, the web development was
suspensed for some time. It's really confortable to know Linux is safier.
the important is that explanations were very clear and useful.
Thank you!


Em 20-07-2013 14:49, Graeme Geldenhuys escreveu:

> On 2013-07-20 12:28, Noah Silva wrote:
>> remember one book recommending the following way to sort a list of strings:
>> 1. Create an invisible list box on the window
> :-)  I'm still required to maintain a VB6 program that is full of such
> sh*t. Hidden controls all over the place. :-/  That definitely was the
> way VB developers coded though.
>
>
> Regards,
>    Graeme
>
> _______________________________________________
> fpc-pascal maillist  -  [hidden email]
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Executable with invisible window and IO enabled

Luciano de Souza
In reply to this post by Graeme Geldenhuys-3
I thank you for the tip. That's true I haven't tested it up to now.
The Windows was damaged by 194 infections. this large amount of virus
has blocked the browsers and, as a result, the web development was
suspensed for some time. It's really confortable to know Linux is safier.
the important is that explanations were very clear and useful.
Thank you!


Em 20-07-2013 14:49, Graeme Geldenhuys escreveu:

> On 2013-07-20 12:28, Noah Silva wrote:
>> remember one book recommending the following way to sort a list of strings:
>> 1. Create an invisible list box on the window
> :-)  I'm still required to maintain a VB6 program that is full of such
> sh*t. Hidden controls all over the place. :-/  That definitely was the
> way VB developers coded though.
>
>
> Regards,
>    Graeme
>
> _______________________________________________
> fpc-pascal maillist  -  [hidden email]
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal