Solved

Running a program without showing it

Posted on 2002-07-04
6
122 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
ID: 7131203
in project source add before Application.Run;
Application.ShowMainform := FALSE;

Regards
//raidos
0
 
LVL 1

Expert Comment

by:herr_apfelschnitt
ID: 7131408
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
ID: 7131433
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
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 
LVL 33

Expert Comment

by:Slick812
ID: 7132194
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
ID: 7132320
listening
0
 

Author Comment

by:delpro
ID: 7135614
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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

772 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