Board index » delphi » Invisible Program - Command Line Arguments

Invisible Program - Command Line Arguments

Does anybody know of a way to create a Delphi 1 application that is
invisible and receives a record number (key) via a command line argument.
Example: Program.exe RecordName.

I'm trying to create a program that prints a record and then terminates
without a form showing.

Thanks,

Bill Taylor            
e-mail: b...@btechdesign.com

 

Re:Invisible Program - Command Line Arguments


Quote
Bill Taylor wrote:

> Does anybody know of a way to create a Delphi 1 application that is
> invisible and receives a record number (key) via a command line argument.
> Example: Program.exe RecordName.

> I'm trying to create a program that prints a record and then terminates
> without a form showing.

> Thanks,

> Bill Taylor
> e-mail: b...@btechdesign.com
>I figured out the command line part, but still can't get the form not to

show. I tried: ShowWindow(Application.Handle,SW_HIDE) in the OnShow
Event, OnCreate Event, and the OnActivate Event.
--

Later,

Bill Taylor            
e-mail: b...@btechdesign.com

Re:Invisible Program - Command Line Arguments


Quote
On Sun, 05 Jan 1997 04:32:57 -0800, Bill Taylor <b...@btechdesign.com> wrote:
>Bill Taylor wrote:

>> Does anybody know of a way to create a Delphi 1 application that is
>> invisible and receives a record number (key) via a command line argument.
>> Example: Program.exe RecordName.

>> I'm trying to create a program that prints a record and then terminates
>> without a form showing.

>> Thanks,

>> Bill Taylor
>> e-mail: b...@btechdesign.com
>>I figured out the command line part, but still can't get the form not to
>show. I tried: ShowWindow(Application.Handle,SW_HIDE) in the OnShow
>Event, OnCreate Event, and the OnActivate Event.
>--

>Later,

>Bill Taylor        
>e-mail: b...@btechdesign.com

Try Application.ShowMainForm := False, before Application.Initialize.
I'm not sure of this, as I never tried it, but I saw a post sometime ago
suggesting it. Give it a try...

Good luck!

Nuno Leal

----
email: nl...@mail.telepac.pt

Re:Invisible Program - Command Line Arguments


Quote
Bill Taylor wrote:

> Does anybody know of a way to create a Delphi 1 application that is
> invisible and receives a record number (key) via a command line argument.
> Example: Program.exe RecordName.

> I'm trying to create a program that prints a record and then terminates
> without a form showing.

> Thanks,

> Bill Taylor
> e-mail: b...@btechdesign.com

Create a Turbo Pascal-like program without a Delphi form:
You can read from files, or write to files just like in Turbo Pascal.
Just don't try to read from or write to the screen (unless you include
the WinCRT unit in Delph 1).  

Instead of compiling such a program from the IDE, go to a DOS
window and use the command-line compiler, DCC.  DCC will create
an EXE that works much like a Turbo Pascal program (again, except
for console I/O).  Debugging can be a bit of a problem this way,
however.

I've created several Delphi utilities that do not
require any user interface this way -- such as a program that
reads an ASCII file and creates a Paradox table without
any user interaction.

--
Earl F. Glynn          EarlGl...@WorldNet.att.net
EFG Software              913/859-9557  Voice/Fax
   Scientific/Engineering/Medical Applications
             Overland Park, KS  USA

Re:Invisible Program - Command Line Arguments


In article <32CFF170.6...@postoffice.worldnet.att.net> "Earl F. Glynn" <EarlGl...@postoffice.worldnet.att.net> writes:

Quote
>From: "Earl F. Glynn" <EarlGl...@postoffice.worldnet.att.net>
>Subject: Re: Invisible Program - Command Line Arguments
>Date: Sun, 05 Jan 1997 12:22:40 -0600
>Bill Taylor wrote:

>> Does anybody know of a way to create a Delphi 1 application that is
>> invisible and receives a record number (key) via a command line argument.
>> Example: Program.exe RecordName.

>> I'm trying to create a program that prints a record and then terminates
>> without a form showing.

>> Thanks,

>> Bill Taylor
>> e-mail: b...@btechdesign.com
>Create a Turbo Pascal-like program without a Delphi form:
>You can read from files, or write to files just like in Turbo Pascal.
>Just don't try to read from or write to the screen (unless you include
>the WinCRT unit in Delph 1).  
>Instead of compiling such a program from the IDE, go to a DOS
>window and use the command-line compiler, DCC.  DCC will create
>an EXE that works much like a Turbo Pascal program (again, except
>for console I/O).  Debugging can be a bit of a problem this way,
>however.
>I've created several Delphi utilities that do not
>require any user interface this way -- such as a program that
>reads an ASCII file and creates a Paradox table without
>any user interaction.

Can't you do this in the IDE ? Can't you just create a new project, then edit
the .DPR file like a normal unit. Remembering also to remove "forms" from the
uses clause

and i think you can still get command line params using the paramstr array or
something - can't recall  

HTH

Boris Ingram, Cyborg Software
boris...@iafrica.com
100076.3...@compuserve.com
http://www.pcb.co.za/users/borising/cyborg.htm

Re:Invisible Program - Command Line Arguments


Quote
Boris Ingram wrote:
> Can't you do this in the IDE ? Can't you just create a new project, then edit
> the .DPR file like a normal unit. Remembering also to remove "forms" from the
> uses clause

Yes, this should all work in the IDE.  Sometimes, for convenience, I use
the command line version of Delphi, DCC and DCC32.  

--
Earl F. Glynn          EarlGl...@WorldNet.att.net
EFG Software              913/859-9557  Voice/Fax
   Scientific/Engineering/Medical Applications
             Overland Park, KS  USA

Other Threads