Face object programming learning:
Override: overload, used for the virtual method (Virtual keyword) defined in the parent class. it overrides the function of the parent class. when you need to reference a new behavior without using an inherited behavior, you can add the reintroduce keyword after the function.
Overload: overload. It is used when the same function name is required for different parameters or return values.
Class methods can include class methods. When declared, the class keyword is added before procedure or function. This method can be directly used when no class object exists, as in. the static methods of classes in. NET are the same. but in the class method body, the member of the class cannot be called, because no class object exists at this time.
When an object is assigned a value, the value assignment operator (: =) is used to assign an object reference to an object variable. The object attributes can be copied using the assign or assignto methods, get two objects in the same state. Using B: = A means that B is a reference of A, and the two are the same object. B. Assign (a) is a separate object, and its state is the same as that of. (This is a frequent cause of Memory leakage)
Application object:
Applications created by the Application ObjectProgramIn fact, there is no size, invisible form, it can be on the Windows taskbar. But it is not the main form defined by the programmer, because it displays the title from tapplication. Title rather than the tform1.caption value. All forms in the program are their subforms.
It is a global variable and can be directly used.
When a modal form object is created, FRM: = tform is used. create (NiL) instead of create (Self), because the object lifecycle can be clear. If you use create (Self) to create an object, its lifecycle is managed by the parent class, so it cannot be displayed to call frm. free Method to release memory. For non-modal forms, you can create them using CREATE (Self) to manage their lifecycles by the owner object.