Solved

Running a program without showing it

Posted on 2002-07-04
6
119 Views
Last Modified: 2010-04-04
How do i make a program run and close without showing the form?
I want to send the program parameters
send an e-mail and close without show a form

The part of get the parameters and sending an e-mail and close is done but i still see a form.
0
Comment
Question by:delpro
6 Comments
 
LVL 3

Expert Comment

by:raidos
Comment Utility
in project source add before Application.Run;
Application.ShowMainform := FALSE;

Regards
//raidos
0
 
LVL 1

Expert Comment

by:herr_apfelschnitt
Comment Utility
You could (if using non-visual e-mail component that doesn't need Forms-unit, or no e-mail component at all) create your application without any forms, and just do all the coding between the "begin" and "end." of your Project Source. Then you won't need the Forms unit at all, which will make your executable much smaller, and save some memory/time while running. Of course, if you're using visual e-mail component this won't help much.

herr_apfelschnitt
0
 
LVL 2

Accepted Solution

by:
Griffon earned 200 total points
Comment Utility
I believe this article covers all that you are looking for with the coding included.

http://delphi.about.com/library/weekly/aa121801a.htm

it shows you how to hide the form along with the Icon in the system tray and even from the task manager :) Hope this is just what you are looking for.

Please note that this is the quick way of sorting it out but if it is quality and efficiency that you are looking for then removing the forms altogether and using a CLI (command line interface) is the best way forward. After all if you are hiding the form then why have it? unless of course u want splash screens to appear in certain circumstances.
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 33

Expert Comment

by:Slick812
Comment Utility
if you want to try an app without the Forms unit this site might help

http://www.angelfire.com/hi5/delphizeus/dpr1.html
0
 
LVL 3

Expert Comment

by:lopem
Comment Utility
listening
0
 

Author Comment

by:delpro
Comment Utility
The Application.ShowMainform := FALSE; don't work

It don't send out the e-mails

Where do I put the code to send the e-mail?
I also sometime send a form if I send param "/Setup"
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now