Board index » delphi » Formless application (console app) in Delphi?

Formless application (console app) in Delphi?

Is it possible to make a formless application in Delphi? (Like a console-based
app?)  I want to write a program that will just start up, send a DDE command
(based on the command line), then quit.  I'd like for it to be as small as
possible, and a form isn't necessary in this instance.

Thanks,
  Mike

 

Re:Formless application (console app) in Delphi?


Quote
Mike Harper wrote:

> Is it possible to make a formless application in Delphi? (Like a console-based
> app?)  I want to write a program that will just start up, send a DDE command
> (based on the command line), then quit.  I'd like for it to be as small as
> possible, and a form isn't necessary in this instance.

> Thanks,
>   Mike

We all like Delphi, but maybe your using the wrong language for this
application.  But if your determined, try creating a new application and
then releasing the form.  You do this by starting a regular run and then
closing down the form by clicking the X (win 95) and then do the same
for the text portion.  It will ask you if you want to save say no.  Now
you can work with only the .DPR.

Hope this works for you.

Mike

Re:Formless application (console app) in Delphi?


Easily. Just start a new project, then File | Remove File... your Form1.
This will leave you with only the project code. You might have to go to
View | Units to make it visible.

Make sure the project code has only the units you actually need in its
USES clause. The Forms unit alone in D1 is 80K+. If you aren't going to
have a form, just delete Forms from the USES clause and your compiled
program will be much smaller. The same for all of the other units,
though they aren't as big.

Be aware, however, that the Forms unit (in D1) contains the Application
object. You won't be able to use Application.Title := , or even
Application.Run without Forms (you won't need Application.Run, since you
aren't creating any forms).

--
Lonny A. Eachus   *   CONSULTECH Computer Services   *
              Mailto:l...@iea.com
    WWPager:  http://www.mirabilis.com/244930

Quote
Mike Harper wrote:

> Is it possible to make a formless application in Delphi? (Like a console-based
> app?)  I want to write a program that will just start up, send a DDE command
> (based on the command line), then quit.  I'd like for it to be as small as
> possible, and a form isn't necessary in this instance.

> Thanks,
>   Mike

Re:Formless application (console app) in Delphi?


Sure, here is a complete application ICANRUN.DPR

program ICANRUN;
uses windows;
begin
  writeln('I am a complete application);
end.

Just remember to set the Linker Option, 'Generate Consol Application'

Nick

On 16 Jul 1997 20:08:32 GMT, har...@shsw.wisc.edu (Mike Harper) wrote:

Quote
>Is it possible to make a formless application in Delphi? (Like a console-based
>app?)  I want to write a program that will just start up, send a DDE command
>(based on the command line), then quit.  I'd like for it to be as small as
>possible, and a form isn't necessary in this instance.

>Thanks,
>  Mike

_______________________________________________________
????????????????????????????

Nick Roux
Johannesburg, South Africa

mailto:Roux_N...@Lilly.Com
HTTP://www.geocities.com/SiliconValley/Lakes/9011/
_______________________________________________________
????????????????????????????

"I disapprove of what you say, but I will defend    
 to the death your right to say it."  
                                     -- Voltaire

Other Threads