Working with Forms and Forms in Delphi

Working with Forms and Forms in Delphi

The basic control element of Delphi is forms. Each form can work on its own and is saved as a unit. Any object does not work alone, it must be connected to a unit. Forms are basic carrier objects, can accommodate other objects.

Normally, the commands of the first created form are executed first, and this is treated as the main form.

I will try to explain the forms in detail. If you understand the properties of the form, the properties of other objects are similar. Some features are described in the Basic properties section of the objects (D: Run time, D: Design time).

Active ır Form is actif (if the title bar is blue) TRUE and passive if FALSE.

ActiveControl D Shows which object is in control (the object that is in Focus) when the form runs. design

In the first stage of the form, which object will be active can be selected.

FormStyle D Specifies the type of the form. Form can be used again in the form. Form used in this sub

forms are called child form, carrier or mother form. fsNormal is a normal form. They do not contain child forms.

fsMDIForm can contain subforms. So is the main form.

fsMDIChild are Child forms. The mother depends on the form.

fsStayOnTop The forms that will always remain at the top.

ActiveMDIChild C indicates the child form.

MDIChildCount Returns the number of child forms that are open.

MDIChildren eriş Used to access one of the Child forms.

MDIChildren [3] .Close closes the chilform with index 3.

ArrangeIcon O Arrange child forms in minimized form.

Cascade Chains the child forms to fit the parents form.

TileMode 0 Determines the shape of the string. Horizontal or vertical.

Tile E Arrange open forms as specified by TileMode.

Next Next Enables the child form.

Previous Ç Activates the previous child form.

ControlCount Returns the number of objects on the form. It does not count the contents of objects that have only carrier properties.

Controls ere Allows access to objects on the form.

Controls [3] .Activ A: = True; as.

ComponentCount Returns the number of object types on a form.

Components Ç Provides access to the types of objects. TEdit (Components [3]).

ComponentIndex Returns the index.

If AutoScroll D is TRUE, the scroll bars will be

occurs, if FALSE does not occur.

If AutoSize D is TRUE, the size of the form is automatically changed according to the size of the objects. FALSE

is not changed.

BorderIcons D Enables the addition of the standard icons in the windows windows of the form.

biSystemMenu Adds the system menu to the form (top left corner).

The minimized button is added to the form.

biMaximiz Forma maximize button is added.

The biHelp Forma help button is added.

BorderStyle D Defines the frame shape of a form. bsSizeable The size of the form can be changed.

bsNone Form does not contain any control element. The code must be written to close the form.

bsSingle Form can only be changed with maximize or minimized.

bsDialog The form has only a close button.

bsSizeToolWin The form title bar has a narrow and close button. Scalable.

bsToolWindow Form title bar has a narrow and close button. It can not be resized.

BorderWidth D Displays the edge thickness of the form.

ClientHeight D Is the available height of the form (header and edge sizes are omitted)

ClientWidth D The available width of the form.

ClientRect Kullan The size of the available area. (Left, Top, Right, Bottom are parameters).

ClientOrigin A is the center of the available space. (It has X and Y parameters).

Constraints D Specifies the boundaries of the object.

Icon D Defines the icon of the form. If no icon is selected, the icon for the application is automatically used.

DefaultMonitor D Indicates where the form will be on multiple monitors.

KeyPreviw D True allows the object to first detect the key events of the object while an object is active.

Menu D The menu of the form. It is created using the TMainMenu object.

PopUpMenu D Displays the PopUp menu of the form. The TPopUpMenu object is created with.

WindowMenu Ç Describes where to add the titles of child forms in the menu.

Position D Indicates the position at which the form is to be opened during initial operation.

PrintScale D Allows appropriate scaling of the printer when the form is printed. PoNone Scaling is not done

Scaling is performed to be the same as PoProportional on the screen.

PoPrinterToFit Scales to full paper coverage.

PixelPerInch er Defines the number of pixels per inch.

Sacaled D TRUE scales the form if the number of PixelPerInch differs from the system.

Print Sends the form to the printer.

WindowState D Shows the status of the form. Normal, minimized or maximize

Close O Used to close the form.

form1.clos A; as

Canvas O This feature is used for graphical operations on the form.

Show Shows the form.

ShowModal Ç Indicates form by blocking access to other forms.

Form Events

OnActivate Occurs when the form becomes active.

OnClose Occurs when closing the form. It has Action parameter.

Action: = CaNone stops the shutdown process.

Action: = In CaHide, the form is not closed but is hidden.

If Action: = CaMinimize, the form is minimized.

Action: = CaFree closes the form. This is the default value.

OnClose, OnCloseQery, OnDeactivate, OnHide, OnDestroy events occur respectively when a form is closed revenue.

OnCloseQuery Occurs when closing a form. (After OnClose). It has the CanClose parameter. TRUE

value is turned off.

The OnCreate Form occurs when it is created for the first time.

When creating a form, OnCreate, OnResize, OnShow, OnActivate, and OnPaint events occur respectively.

OnDeactivate Occurs when losing form activity.

OnActivate Occurs when the form is active.

OnDestroy Occurs when the form is completely destroyed.

OnHelp Occurs if a help prompt occurs on the form.

OnHide Occurs when the form is hidden.

OnPaint Occurs when the form is being redrawn.

OnShortCut Occurs by pressing the Shortcut key. OnKey is activated before the events.

OnReSize occurs when resizing the form.

Forms have many more features. That's enough for now. Most of the features here

It is defined. These features will not be repeated when other objects are described.