Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Best way to write a small Delphi Program

Status
Not open for further replies.

rogerte

Programmer
Nov 9, 2001
164
GB
I need to rewrite a program that starts-up every time Windows (2000) starts, and just sits in the background waiting until it detects the presence of a certain file. Then when the file has appeared it needs to display a message abd then close down.

I have never tried such an app. and would like some advice as the best way to proceed. I have got a program that works, but I would prefer that it didn't load all the standard Delphi stuff.

Can anyone give me advice as to how tro proceed?

Roger
 
You can remove anything you dont need by deleting everything under the uses clause of your project. When you recompile, Delphi will just add what you need.


When your feeling down and your resistance is low, light another cigarette and let yourself go [rockband]
 
If you use the visual components they will be big, because they are translations of the windows API's.
Delphi makes it easier to use these small embedded dll's in the operating system, because it make them easier to understand.

Almost all the windows related procedures, functions, visual components etc.. that are in Delphi, you can directly access by unsing the Windows API. but.. compare the helpfile of delphi/Borland with the Win32 Developer's Reference from Micro$oft.

You can make smaller exe files using plain API functions, but you will have to debug them by yourself.

Steven van Els
SAvanEls@cq-link.sr
 
just start a new application in delphi,
remove form from project and use this as project source code

program Project1;

uses
windows;

{$R *.res}

begin
postmessage(0,0,0,0);
end.


if you compile this code, it takes up about 15k of code, small enough??
if you really want small apps DONT use any delphi VCL unit like Forms or Dialogs or whatever. offcourse you'll loose all the nice things that delphi offers. if you don't like the big size of delphi vcl apps take a look at Kol object instead ( you can create really small apps but it isn't so flexible in design...

 
Thanks for the replies - Kol Object looks interesting.

Roger
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top