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

Noah Silva shiruba at galapagossoftware.com
Sat Jul 20 13:28:15 CEST 2013


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 <graeme at geldenhuys.co.uk>

> 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  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20130720/09881f7f/attachment.html>


More information about the fpc-pascal mailing list