The important point is freeing the object from memory, or your application will leak memory.There are three ways to handle this: Declare a variable, call the class' Create() method, and end with Free(), preferably in a try/finally structure: A second way is to use the With structure, and set the instance's owner as a form, so that, even if you forgot to call Free, Delphi will free the object from memory when it kills the parent form (Actually, you should NOT call Free, and let the owner free the instance from memory): Note that the time to dynamically create components with owners is much slower than that to create components without owners. Here's how to read each line of a tab-delimited text file, and save this into an SQLite database: At design-time, the best way to add radio buttons to a form is by first adding a radiogroup object, and modify its Items property to add radio buttons.A third way is to use the With structure with Nil as the parent, but in this case, Free() must be called explicitely: Application is declared in the forms unit. Here's how to display the radio button currently selected, if any: Delphi supports static and dynamic arrays.To make things a bit confusing, it uses the same syntax "array of" to declare dynamic arrays, and so-called "open arrays", ie.DPR file), while the forms (windows) are described in files with the DFM extension, ie. Here's a skeleton of a unit: Open a DOS box, compile the program with "dcc32console", and run the compiled as with "console.exe".In the empty form that shows up when starting Delphi, add a label and a pushbutton, double-click on the button, and add the following code to the Button1Click() routine: Hit F9 to run the application, and click on the pushbutton to see the text of the label change.Moving a design package to another host requires copying the following files: BPL, DCP, possibly DCR resources files, hitting the Component Install Packages menu, and clicking on Add.In addition to individual packages, it is possible to create a package collection (DPC) to make it easier to distribute the different files that make up a package. This type of file requires a Package Collection Editor (PCE), which is a source file used to define a DPC file.
From what I understand, a typical situation is thus: Packages, the compiler will either (if disabled) include all the DCU files into the EXE, or (if enabled) use an external BPL file, that you'll have to distribute in addition to the EXE.A DPC file is created through Tools A typical Delphi GUI program is a set of units (*.PAS) which contain source code, and are listed in a project (.On the other hand, dynamic run-time packages contain all the routines, even those that your EXE doesn't use, while, when using statically-linked packages, the IDE will only include stuff that your EXE actually use.In the end, a statically-linked EXE can turn out to be smaller that a bare EXE and external BPLs.