devxlogo

Delphi console application

Delphi console application

Question:
Is it possible to write a non-interactive program in Delphi 2.0 that does something quick in the background without opening a form or a console window?

Answer:
Sure, but you have to be pretty careful about it.

First, start a newproject, then remove the main form form of the application. Then the codeyou’ll write will go either into the project file itself, or anotherunit that the project file “uses.” From the project file, you can callsome main procedure for your program and it will run just fine. However, fortrue background processing, you’ll probably want to run your program in aseparate thread.

devx-admin

Share the Post: