Best way to run a batch prog....

I would like to verify the best way to write a batch program....
If creating a batch program, and I place all the code in the main form, (with no CreateForm commands) then I cannot use any of the VCL components unless I dynamically create them, right? Is there a better way to do this or am I planning this the best way?
In other words, I can't drop any components (lets say label, listbox, and timer) on a form because even making the form invisible still creates it initially and shows it. I need to create these dynamically in the main file, after removing any CreateForm statements, correct?

Hi
what you are saying is correct just place your code in the main dpr file (view - units - project1) and remove all references to the unit1 and form1 from project.
you may need to add some units to the uses section of the main dpr if your using showmessage() for instance you'd ned to add dialogs etc..
what is your batch program for?
Regards Barry

You also have to put the link to the directory where fmxutils are in Tools->Environment options :

c:\program files\borland\delphi5\demos\doc\filmanex

or
$DELPHI)\demos\doc\filmanex;

0

jexd99Author Commented: 2000-01-02

inthe,

There is no way to add/drop components from the VCL in this case is there (when using only the main dpr)? I think the only option is to dynamically create these as needed, but I just want to make sure before I get too deep into this. :)

(Also how to I give you the points for this when you weren't the first answer?)

yes you have it all straight in your head :-)
you can only create them dynamically (and only components that dont need a form(canvas property etc) if your not going to have a form ;-)so you couldnt create a tlabel but you could create a
ttimer or use a stringlist but not a memo etc.. you know what i mean .
if you dont know the easist way to remove the default form from a new project you can go to the menu in delphi and choose project - remove from project and choose unit1,form1 then after removeing go to menu item view and choose unts and choose project1.that should set it up to start.

btw.
you probably know but you must remember to free these thing you create as well .
i was asking about waht the batch was going to do because i wondered if you knew you could create .bat files in code if you needed.