How can I minimize the space occupied by the Program (if possible, can I list all the methods ?) Delphi/Windows SDK/API
Http://www.delphi2007.net/DelphiAPI/html/delphi_20061109112042268.html
If I only need a simple function Code For example:
Windows. Beep (, 10); // enable speaker D.
The size of the file generated after I press F9 is 359kb.
Question 1: Why does a simple function occupy such a large space?
Question 2: How many solutions are there? How can this problem be solved?
Question 3: If you want to use Delphi to write large Program , How to write it to make the program smaller and more convenient to update? (I mainly want to ask about the program structure, such as how to implement modular design =)
I am a beginner. Well, I am a little confused. Don't be surprised.
Oh, I suggest you look at the aimingoo predecessors <DelphiSource codeAnalysis> this book,
Http://www.china-pub.com/computers/common/info.asp? Id = 15247
Write the console app.
Then, remove the sentence {$ app .. console} on the console.
Reference windows. Pas
Create a pure SDK program.
Project-> Option package removes unnecessary packages and then compiles them.
Do not use VCL in the program, and use pure API for writing. The EXE size will be much smaller. The minimum value is 10 KB.
PE format minimum 1.5
You can use the DOS com format.
Uses windows;
Begin
Beep (, 10 );
End;
This should be the smallest
Finally, compile it for about 8 KB. I tried it.
Use console application, do not use VCL, use pure API to write
Use ASPack for compression
If components are used, there is a set of keys or something, which the Rus are engaged in. It is strong and used to replace VCL. For example, this simple program is less than 100 kb and VCL is also used.
Volume sensitive?
The error message returned when the PE format is at least 3.5 kb //
This degree of program ASPack compression will increase the volume ..
Com format ..