views:

216

answers:

2

For example, this simple program:

Program Helloworld;
Begin
  writeln ('Hello world!');
  readln;
End;
+3  A: 

You can get rid of all the forms that a new project creates, and just have a program in the project file.

This looks like a console app so you'll want to do some steps. This is taken from the excellent delphi.about.com:

  1. Select "File | New Application"
  2. Select "Project | Remove From Project..."
  3. Select Unit1 (Form1) and click OK. Delphi will remove the selected unit from the uses clause of the current project.
  4. Select "Project | View Source"
  5. Edit your project source file: • Delete all the code inside "begin" and "end". • After the uses keyword, replace the "Forms" unit with "SysUtils". • Place {$APPTYPE CONSOLE} right under the "program" statement.
_J_
What's wrong with "File | New other ... | Console Application"?
dummzeuch
I wasn't sure this option was available in all versions of Delphi so I gave an answer that would be suitable if it wasn't there.
_J_
+6  A: 
  1. Select "File|New|Other..." - the "New Items" Dialog appears

  2. Select "Delphi Projects" on the left panel

  3. Select "Console Application" on the right panel

  4. Click "OK" button.

That is all.

Serg