CustomForm#

Qualified name: delphivcl.CustomForm

class CustomForm#

Bases: WinControl

TCustomForm is the base class from which to derive a window such as a form or dialog. Derive from TCustomForm to create a custom window. The TCustomForm descendant can contain other objects, such as TButton, TCheckBox, and TComboBox objects.

Methods

AfterConstruction

Construction event dispatcher.

BeforeDestruction

Destruction event dispatcher.

Close

Closes the form.

CloseQuery

Close attempt event dispatcher.

Create

Creates and initializes a new TForm object.

CreateNew

<Delphi method CreateNew of type TCustomForm at 211415E6220>

DefaultHandler

Provides message handling for all messages that the form does not fully process.

DefocusControl

Removes focus from a control on the form.

Destroy

Removes the form from memory.

Dock

Handles automatic docking of the form into other windows.

FocusControl

Sets focus to a control on the form.

GetChildren

Returns the "child" components of the form; that is, those components that return the form from their GetParentComponent method.

GetFormImage

Returns a bitmap of the form.

Hide

Hides the form.

IsShortCut

Processes shortcut keys when the form has focus.

LoadProps

Load properties from a .pydfm file

MakeFullyVisible

Ensures that the form is fully visible on a specified monitor.

MouseWheelHandler

Directs mouse wheel messages to the appropriate control.

Print

Prints the form.

RecreateAsPopup

Embarcadero Technologies does not currently have any additional information.

Release

Destroys the form and frees its associated memory.

ScaleForCurrentDPI

Checks if there is a change in Dpi and performs the necessary changes to scale all the controls for the new Dpi.

ScaleForPPI

Embarcadero Technologies does not currently have any additional information.

SendCancelMode

Cancels modes on the form.

SetFocus

Sets focus to the form.

SetFocusedControl

Sets focus to a control on the form.

Show

Shows the form.

ShowModal

Shows a form as a modal dialog.

UpdateDesignerCaption

Embarcadero Technologies does not currently have any additional information.

WantChildKey

Indicates whether the form processes keyboard input for a control it owns.

set_PopupParent

Embarcadero Technologies does not currently have any additional information.

Attributes

Action

Specifies the action associated with the control.

Active

Specifies whether the form has focus.

ActiveControl

Specifies the control that has focus on the form.

ActiveOleControl

Specifies the OLE control on the form that reacts to changes in focus.

Align

Determines how the control aligns within its container (parent control).

AlignDisabled

Indicates child control realignment disabled.

AlignWithMargins

Specifies whether a control should be constrained by margins.

Anchors

Specifies how the control is anchored to its parent.

BiDiMode

Specifies the bidirectional mode for the control.

BorderStyle

Specifies the appearance and behavior of the form border.

BoundsRect

Specifies the bounding rectangle of the control, expressed in the coordinate system of the parent control.

Brush

Determines the color and pattern used for painting the background of the control.

Canvas

Provides access to the drawing area of the form.

Caption

Specifies a text string that identifies the control to the user.

ClassName

Returns the TObject.ClassName

ClientHeight

Specifies the height of the control's client area in pixels.

ClientOrigin

Specifies the screen coordinates (in pixels) of the upper-left corner of a control's client area.

ClientRect

Specifies the size of a control's client area in pixels.

ClientWidth

Specifies the horizontal size of the control's client area in pixels.

Color

Specifies the background color of the control.

ComObject

Specifies the interface reference implemented by the component.

ComponentCount

Indicates the number of components owned by the component.

ComponentIndex

Indicates the position of the component in its owner's Components property array.

ComponentState

Describes the current state of the component, indicating when a component needs to avoid certain actions.

ComponentStyle

Governs the behavior of the component.

Components

<Delphi indexed property Components of type TComponent at 21141642500>

Constraints

Specifies the size constraints for the control.

ControlCount

Returns the number of child controls.

ControlState

Specifies the current state of a control at run time.

ControlStyle

Determines style characteristics of the control.

Controls

<Delphi indexed property Controls of type TWinControl at 211416EE760>

CurrentPPI

Embarcadero Technologies does not currently have any additional information.

Cursor

Specifies the image used to represent the mouse pointer when it passes into the region covered by the control.

CustomHint

CustomHint is a custom hint for the control.

CustomTitleBar

Embarcadero Technologies does not currently have any additional information.

DesignInfo

Contains information used by the Form designer.

Designer

Specifies the designer interface for the form.

DockClientCount

Specifies the number of controls that are docked on the windowed control.

DockClients

<Delphi indexed property DockClients of type TWinControl at 211416EE520>

DockManager

Specifies the control's docking manager interface.

DockOrientation

DockOrientation specifies how the control is docked relative to other controls docked in the same parent.

DockSite

Specifies whether the control can be the target of drag-and-dock operations.

DoubleBuffered

Determines whether the control's image is rendered directly to the window or painted to an in-memory bitmap first.

DropTarget

Specifies whether the form is the target of a drag-and-drop operation.

Enabled

Controls whether the control responds to mouse, keyboard, and timer events.

ExplicitHeight

Specifies the explicit vertical size of the control in pixels.

ExplicitLeft

Specifies the explicit horizontal pixel coordinate of the left edge of a component relative to its parent.

ExplicitTop

Specifies the explicit vertical pixel coordinate of the top edge of a component relative to its parent.

ExplicitWidth

Specifies the explicit horizontal size of the control in pixels.

Floating

Specifies whether the control is floating.

FloatingDockSiteClass

Specifies the class of the temporary control that hosts the control when it is floating.

Font

Specifies the attributes of text written on or in the control.

FormState

Indicates transitional state information about the form.

GlassFrame

Accesses the Glass Frame under Windows Vista, Windows 7, or later Windows operating systems.

Handle

Provides access to the underlying Windows screen object for the control.

Height

Specifies the vertical size of the control in pixels.

HelpContext

The HelpContext property contains the numeric context ID that identifies the Help topic for the control.

HelpFile

Specifies the name of the Help file the form uses to display the Help from.

HelpKeyword

The HelpKeyword property contains the keyword string that identifies the Help topic for the control.

HelpType

Specifies whether the control's context-sensitive Help topic is identified by a context ID or by keyword.

Hint

Hint contains the text string that appears when the user moves the mouse over the control.

HostDockSite

Specifies the control in which the control is docked.

IsDrawingLocked

IsDrawingLocked property returns True when redrawing for this control is locked.

KeyPreview

Specifies whether the form should receive keyboard events before the active control.

LRDockWidth

Specifies the width of the control when it is docked horizontally.

Left

Specifies the horizontal coordinate of the left edge of a component relative to its parent.

Margins

Specifies the margins of the control.

Menu

Specifies the form's main menu.

ModalResult

Represents the return value of a form that is used as a modal dialog.

Monitor

Provides access to the monitor on which the form appears.

MouseInClient

Indicates whether the mouse pointer is currently in the client area of the control.

Name

Specifies the name of the component as referenced in code.

Observers

Indicates the TObservers object added to the TComponent.

OleFormObject

Specifies the IOleForm interface for an in-place OLE object contained in the form.

OnGesture

<Delphi property OnGesture of type TControl at 211418EC500>

Owner

Indicates the component that is responsible for streaming and freeing this component.

Padding

Specifies the padding of a control.

Parent

Specifies the parent of the control.

ParentCustomHint

Specifies where a control looks for its custom hint.

ParentDoubleBuffered

ParentDoubleBuffered defers the DoubleBuffered property of this component to the value of the parent's DoubleBuffered property.

ParentWindow

Reference to parent's underlying control.

PixelsPerInch

Embarcadero Technologies does not currently have any additional information.

PopupMode

Controls how the top-level form behaves with respect to Window's WS_POPUP style.

PopupParent

Sets an order for stacked forms that users cannot change.

RedrawDisabled

RedrawDisabled property returns True when redrawing for this control is locked.

ScaleFactor

Embarcadero Technologies does not currently have any additional information.

Scaled

Specifies whether the form is sized according to the value of the PixelsPerInch property.

ScreenSnap

Specifies whether form snaps to edge of screen.

ShowHint

ShowHint specifies whether to show the Help Hint when the mouse pointer moves over the control.

Showing

Indicates whether the control is showing on the screen.

SnapBuffer

Specifies distance for screen snap.

StyleElements

Specifies the style elements that are used by the control.

StyleName

Embarcadero Technologies does not currently have any additional information.

TBDockHeight

Specifies the height of the control when it is docked vertically.

TabOrder

Indicates the position of the control in its parent's tab order.

TabStop

Determines whether the user can tab to a control.

Tag

Stores a NativeInt integral value as a part of a component.

TaskbarHandler

Embarcadero Technologies does not currently have any additional information.

Top

Specifies the Y coordinate of the upper-left corner of a control, relative to its parent or containing control in pixels.

Touch

Specifies the touch manager component associated with the control.

UndockHeight

Specifies the height of the control when it is floating.

UndockWidth

Specifies the width of the control when it is floating.

UseDockManager

Specifies whether the docking manager is used in drag-and-dock operations.

VCLComObject

Represents information used internally by components that support COM.

Visible

Specifies whether the component appears onscreen.

VisibleDockClientCount

Specifies the number of visible controls that are docked on the windowed control.

Width

Specifies the horizontal size of the control or form in pixels.

WindowProc

<Delphi property WindowProc of type TControl at 211418EC1C0>

WindowState

Represents how the form appears on the screen.

Action#

Specifies the action associated with the control. Action is the action object that is associated with the control. Actions allow an application to centralize the response to user commands. When a control is associated with an action, the action determines the appropriate properties and events of the control (such as whether the control is enabled or how it responds to an OnClick event). To create actions at design time, place an action list component on a form or data module. Double-click the action list to bring up the action list editor. Add actions in the editor using its context menu. Once the actions have been added using the Action List editor, they appear in the drop-down list for the Action property in the Object Inspector.

Active#

Specifies whether the form has focus. Use Active to determine whether the form has focus. The Active Form receives all keyboard input. If it has a title bar, it is drawn using the active colors specified in the Control panel. If Active is true , the form has focus; if Active is false, the form does not have focus.

ActiveControl#

Specifies the control that has focus on the form. Use ActiveControl to get or set the control that has focus on the form. Only one control can have focus at a given time in an application. If the form does not have focus, ActiveControl is the control on the form that will receive focus when the form receives focus.

Note: When focus shifts to another control, ActiveControl is updated before the OnExit event occurs.

ActiveOleControl#

Specifies the OLE control on the form that reacts to changes in focus. Use ActiveOleControl to get or set an OLE control on the form that reacts to changes in focus. If ActiveOleControl is not nil (Delphi) or NULL (C++), the user interface for the specified OLE control is deactivated when it is not focused. Also, when the form receives or loses focus, the document window for the specified OLE control is activated or deactivated respectively.

AfterConstruction()#

Construction event dispatcher. AfterConstruction is the dispatcher for the event that occurs immediately after the form object’s construction. As implemented in TCustomForm, AfterConstruction calls the OnCreate event handler, provided the OldCreateOrder property is false.

BeforeDestruction()#

Destruction event dispatcher. BeforeDestruction is the dispatcher for the event that occurs immediately before the form object’s destruction. As implemented in TCustomForm, BeforeDestruction calls the OnDestroy event handler, provided the OldCreateOrder property is false.

BorderStyle#

Specifies the appearance and behavior of the form border. Use BorderStyle to get or set the appearance and behavior of the form border. BorderStyle can be any of the following TForm BorderStyle values:

Value

Meaning

bsDialog

Not resizable; no minimize/maximize menu

bsSingle

Not resizable; minimize/maximize menu

bsNone

Not resizable; no visible border line

bsSizeable

Standard resizable border

bsToolWindow

like bsSingle but with a smaller caption

bsSizeToolWin

like bsSizeable with a smaller caption

Note: Changing the border style of an MDI child form to bsDialog or bsNone has no effect.

Canvas#

Provides access to the drawing area of the form. Use TCanvas to draw on the client area of the form. Canvas is often used in the OnPaint event handler.

Caption#

Specifies a text string that identifies the control to the user. Use Caption to specify the text string that labels the control. To underline a character in a Caption that labels a component, include an ampersand (&) before the character. This type of character is called an accelerator character. The user can then select the component by pressing ALT while typing the underlined character. To display an ampersand character in the caption, use two ampersands (&&).

Notes: Controls that display text use either the Caption property or the Text property to specify the text value. The property that is used depends on the type of control. In general, Caption is used for text that appears as a window title or label, while Text is used for text that appears as the content of a control. For some controls, such as TButton, it is not possible to change the color of the Caption. If you want to change the color of a button caption, you should use an alternate button type such as TSpeedButton or TBitBtn instead of TButton. With either TSpeedButton or TBitBtn, you can change the color of the Caption property by using the Font property. For TLinkLabel, an HTML tag is declared inside the Caption property either at run time or at design time.

Close()#

Closes the form. Call Close to close a form. Attempts to close a form can be aborted by the CloseQuery event dispatcher or the OnCloseQuery event handler.

Note: When the main form of the application closes, the application terminates.

CloseQuery()#

Close attempt event dispatcher. CloseQuery is called automatically when an attempt is made to close the form. CloseQuery can allow the form to close by returning true, or prevent the form from closing by returning false. As implemented in TCustomForm, CloseQuery polls any MDI children by calling their CloseQuery methods. If no child form aborts the close, CloseQuery then calls the OnCloseQuery event handler, if it exists, to determine if the close should be allowed. If no such event handler exists, CloseQuery returns true.

Color#

Specifies the background color of the control. Use Color to read or change the background color of the control. If a control’s Vcl.Controls.TControl.ParentColor property is True, then changing the Color property of the control’s parent automatically changes the Color property of the control. When the value of the Color property is changed, the control’s ParentColor property is automatically set to False. The Color of a TLabel is always the color of the background unless you set TLabel.Transparent to False.

Create(AOwner: Component)#

Creates and initializes a new TForm object. Use Create to instantiate a TForm object or descendant of TForm at runtime. AOwner is the owner of the TCustomForm object. For descendants of TCustomForm that are not TForm objects, use CreateNew instead. Calling Create for a TCustomForm descendant that is not a TForm will raise an exception.

CreateNew(AOwner: Component, Dummy: Integer)#

<Delphi method CreateNew of type TCustomForm at 211415E6220>

CustomTitleBar#

Embarcadero Technologies does not currently have any additional information.

DefaultHandler(Message)#

Provides message handling for all messages that the form does not fully process. Override DefaultHandler to change the default message handling for the form. This is seldom necessary because messages can be handled by creating message methods. DefaultHandler passes any otherwise-unhandled messages to the form’s window procedure by calling the CallWindowProc OS function.

Note: In Delphi code, calling inherited in a message-handling method results in a call to the ancestor’s DefaultHandler method unless that ancestor specifies a handler for the message.

DefocusControl(Control: WinControl, Removing: Boolean)#

Removes focus from a control on the form. Use DefocusControl to remove focus from a control on the form. This method is used internally by the VCL. Control is the control from which to remove focus. If Control is the form’s active control, DefocusControl sets the form’s ActiveControl property to nil (Delphi) or NULL (C++). Removing specifies whether to set focus to the control’s parent.

Designer#

Specifies the designer interface for the form. The Designer property is used internally at design time. Never assign a value to this property. This is done automatically by the form designer. Only use this property when designing classes for use in the form designer, such as property editors and component editors.

Destroy()#

Removes the form from memory. Do not call Destroy. Instead, call Release, which indirectly produces a call to the Free method, which in turn calls Destroy.

Dock(NewDockSite: WinControl, ARect: Rect)#

Handles automatic docking of the form into other windows. Do not call Dock in application code. It is called automatically when the form is released on a docking site that will accept it. To dock a form programmatically, use the ManualDock method instead.

DropTarget#

Specifies whether the form is the target of a drag-and-drop operation. Use DropTarget to determine whether the form is currently the target of a drag-and-drop operation.

FocusControl(Control: WinControl)#

Sets focus to a control on the form. Use FocusControl to set focus to a control on the form. Control is a TWinControl object encapsulating the control on which to set focus. FocusControl sets the ActiveControl property.

Font#

Specifies the attributes of text written on or in the control. To change to a new font, specify a new TFont object. To modify a font, change the value of the Charset, Color, Height, Name , Pitch, Size, or Style of the TFont object.

Note: Changing the font color of the Caption is not supported for some controls (such as TButton). In most cases, there is an alternate control you can use whose Font property will change the color of the caption or text (such as TBitBtn or TSpeedButton).

FormState#

Indicates transitional state information about the form. Read FormState to determine the state of the form. FormState indicates when the form is in various transitional states or when certain Windows operations have occurred. The following table lists the values that can be included in a form’s state:

Value

Meaning

fsCreating

The form’s constructor is currently executing.

fsVisible

The form’s window is visible. This state is used to update the Visible property.

fsShowing

The form’s WindowState property is changing. This state is used to prevent WindowState changes from interfering with a transition that is in progress.

fsModal

The form was created as a modal window.

fsCreatedMDIChild

The form is an MDI parent window. This state is only set once the MDI client window has been created.

fsActivated

The form has received a CM_ACTIVATE message (because it received focus or the application became active) but has not yet called the Activate method to generate an OnActivate event.

GetChildren(Proc: GetChildProc, Root: Component)#

Returns the “child” components of the form; that is, those components that return the form from their GetParentComponent method. The component streaming system calls GetChildren to request that the form execute a callback for every child component in the form. The callback must execute in creation order (the order the child components appear in the form file). A child component is defined as any component that returns this form from its GetParentComponent method. Proc is the callback to execute for every child component. Root specifies the top-level component (such as a form or data module) that is currently being loaded or saved. In TCustomForm, GetChildren first calls the inherited method, which executes Proc for every control that lists the form as its Parent. Then, if the Root parameter identifies this form, GetChildren executes Proc for every child component that does not have a Parent.

GetFormImage()#

Returns a bitmap of the form. Use the GetFormImage method to obtain a bitmap of the form.

GlassFrame#

Accesses the Glass Frame under Windows Vista, Windows 7, or later Windows operating systems. Use GlassFrame to make your forms Windows Vista or Windows 7 Aero-compatible, displaying a glass effect. GlassFrame is a property of a TGlassFrame object created automatically for any form.

Note: The property is only available for Windows Vista or Windows 7 with Aero. Otherwise, the Glass Frame is ignored.

HelpFile#

Specifies the name of the Help file the form uses to display the Help from. If your form should have a Help file different from the default Help file of the application specified using the TApplication.HelpFile property of the global TApplication type object, then use the HelpFile property of the form to specify the name of the Help file the form will use to display the Help from. The Help system specified by TApplication.HelpSystem displays Help topics from the Help file specified by the HelpFile property of the form when the form has the focus.

Hide()#

Hides the form. Hide sets the Visible property to false.

IsShortCut(Message: WMKey) Boolean#

Processes shortcut keys when the form has focus. IsShortCut is called automatically when the user presses a key while the form has focus. It allows the form to dispatch shortcut keys and bypass the standard keystroke processing (OnKeyDown, OnKeyPress, and OnKeyUp events). The Message parameter encapsulates the Windows message describing the keypress. If a shortcut for the key exists, IsShortCut executes the appropriate command and returns true. Otherwise IsShortCut returns false. IsShortCut generates an OnShortCut event to allow the developer to insert shortcuts for the form. If the keystroke is not handled in an OnShortCut event handler, IsShortCut checks for any shortcuts associated with the form’s menus and actions.

KeyPreview#

Specifies whether the form should receive keyboard events before the active control. If KeyPreview is true, keyboard events occur on the form before they occur on the active control. (The active control is specified by the ActiveControl property.) If KeyPreview is false, keyboard events occur only on the active control. Navigation keys (Tab, BackTab, the arrow keys, and so on) are unaffected by KeyPreview because they do not generate keyboard events. Similarly, when a button has focus or when its Default property is true, the Enter key is unaffected by KeyPreview because it does not generate a keyboard events. KeyPreview is false by default.

Left#

Specifies the horizontal coordinate of the left edge of a component relative to its parent. Vcl.Forms.TCustomForm.Left inherits from Vcl.Controls.TControl.Left. All content below this line refers to Vcl.Controls.TControl.Left. Specifies the horizontal coordinate of the left edge of a component relative to its parent. Use the Left property to determine where the left side of the control begins or to reposition the left side of the control. If the control is contained in another control, the Left and Top properties are relative to the parent control. If the control is contained directly by the form, the property values are relative to the form. For forms, the value of the Left property is relative to the screen in pixels.

LoadProps()#

Load properties from a .pydfm file

MakeFullyVisible(AMonitor: Monitor)#

Ensures that the form is fully visible on a specified monitor. Call MakeFullyVisible to ensure that the form does not appear split over more than one monitor in a multi-monitor application. AMonitor is the monitor on which the form should appear. If AMonitor is nil (Delphi) or NULL (C++), MakeFullyVisible uses the Monitor property. MakeFullyVisible checks whether the form fits entirely on the specified monitor. If not, it repositions the form so that it fits, if possible.

Menu#

Specifies the form’s main menu. Use Menu to get or set the form’s main menu. At design time, Menu is set to the first TMainMenu component added to the form.

ModalResult#

Represents the return value of a form that is used as a modal dialog. Use ModalResult to close the form when it is displayed modally. By default, ModalResult is mrNone. Set ModalResult to any nonzero value to close the form. The value assigned to ModalResult becomes the return value of the ShowModal function call used to display the form.

Note: This property is modified automatically by some components such as the TButton control. Tip: If you call the Close method from a modal form, then ModalResult is automatically set to mrCancel.

Monitor#

Provides access to the monitor on which the form appears. Use Monitor to access information about the monitor on which the form appears if the application runs on a multi-monitor system. The monitor is determined by the DefaultMonitor property.

MouseWheelHandler(Message: Message)#

Directs mouse wheel messages to the appropriate control. MouseWheelHandler is called automatically when the form or any windowed control contained in the form receives a message from a mouse wheel. The Message parameter encapsulates the message. As implemented in TCustomForm, MouseWheelHandler performs no special processing, but simply redirects the message to the active control by calling its Perform method. By default, the Perform method generates the appropriate mouse wheel events.

OleFormObject#

Specifies the IOleForm interface for an in-place OLE object contained in the form. OleFormObject is used to communicate resize and destroy notifications when a form is used as a frame for an in-place OLE object.

PopupMode#

Controls how the top-level form behaves with respect to Window’s WS_POPUP style. The PopupMode property controls how the top-level form behaves with respect to Window’s WS_POPUP style. A window that has the WS_POPUP style is always above its “owner” in Z-order. You can use the PopupMode property in conjunction with the PopupParent property to avoid the appearance of a hung application caused by a modal dialog showing up behind another form on the screen.

Note: Using the PopupMode property is similar to specifying fsStayOnTop for the FormStyle property, but allows better control over the layering. The PopupMode property is automatically set to pmAuto when the ShowModal method is called. However, this causes the window handle to be recreated, which is not usually desirable. To avoid the re-creation of window handles, you can explicitly set the PopupMode property to pmAuto prior to calling the ShowModal method (such as at design time). Set the PopupMode property to pmExplicit for non-modal design windows such as tool palettes and other floating tool windows. This causes the windows to always remain on top of the main form. In the case of a snapped together design (in which the window is docked to the main form), the design window remains on top of the designer.

Note: For undocked windows, the design window remains above the main form, allowing other top-level forms to obscure the design window. Set the PopupMode property to pmNone if you want the pop-up window to have the pre-Delphi 8 behavior (except for the ShowModal item mentioned above). You can force the Z-Ordering of your forms and create a “stacked” appearance that the user cannot change by setting the PopupParent property to an explicit TCustomForm. If the PopupMode property is pmExplicit and PopupParent is nil, then the Application.MainForm is implicitly used as the PopupParent. If no Application.MainForm is assigned, then Application.Handle is used as the PopupParent. If the PopupMode property is set to pmAuto, Screen.ActiveForm is used as the PopupParent.

PopupParent#

Sets an order for stacked forms that users cannot change. If the PopupMode property is set to pmExplicit and PopupParent is nil, then the Application.MainForm is implicitly used as the PopupParent. If no Application.MainForm is assigned, then Application.Handle is used as the PopupParent. If the PopupMode property is set to pmAuto, Screen.ActiveForm is used as the PopupParent property.

Print()#

Prints the form. Call Print to print the form. Print uses the GetFormImage method to obtain a bitmap of the form and draws that to the printer’s HDC.

RecreateAsPopup(AWindowHandle: HWND)#

Embarcadero Technologies does not currently have any additional information.

Release()#

Destroys the form and frees its associated memory. Use Release to destroy the form and free its associated memory. Release does not destroy the form until all event handlers of the form and event handlers of components on the form have finished executing. Release also guarantees that all messages in the form’s event queue are processed before the form is released. Any event handlers for the form or its children should use Release instead of Free (Delphi) or delete (C++). Failing to do so can cause a memory access error.

Note: Release returns immediately to the caller. It does not wait for the form to be freed before returning.

ScaleForCurrentDPI()#

Checks if there is a change in Dpi and performs the necessary changes to scale all the controls for the new Dpi.

ScaleForPPI(NewPPI: Integer)#

Embarcadero Technologies does not currently have any additional information.

Scaled#

Specifies whether the form is sized according to the value of the PixelsPerInch property. Scaled determines whether the form adjusts itself to differences between the font used at design time and the current system font used by a system at runtime. If Scaled is true, the form resizes itself and all its child controls to maintain the relationship between the size of controls and the height of text displayed in the default font. If Scaled is false, no such resizing occurs. By setting Scaled to true, the form can adjust to fonts that are not scalable (that is, fonts that only supply discrete point sizes) or to differences such as forms designed using small fonts at design time that are run on systems that use large fonts. The degree of resizing is determined by the PixelsPerInch property, which measures the proportion of the font on the system used when designing the form.

ScreenSnap#

Specifies whether form snaps to edge of screen. ScreenSnap determines whether the edges of the form snap to the edge of the screen when the user moves the form. To control the snap distance, set the SnapBuffer property.

SendCancelMode(Sender: Control)#

Cancels modes on the form. Use SendCancelMode to release the mouse capture and cancel scroll bar input and menu processing on the form.

SetFocus()#

Sets focus to the form. Use SetFocus to give the form input focus. SetFocus calls the SetFocus method of the active control, if one exists. To determine whether the form has focus, use the Active property.

SetFocusedControl(Control: WinControl) Boolean#

Sets focus to a control on the form. Use SetFocusedControl to give a control on the form input focus. SetFocusedControl returns false if the Control specified by the Control parameter was already in the process of receiving focus, true otherwise.

Note: A return value of true does not indicate the control has successfully received input focus. If the Control can’t have focus (for example, if it is not visible), SetFocusedControl will still return true, indicating that an attempt was made.

Show()#

Shows the form. Use Show to set the form’s Visible property to true and to bring the form to the front of other forms on the screen.

ShowModal()#

Shows a form as a modal dialog. Use ShowModal to show a form as a modal form. A modal form is one where the application can’t continue to run until the form is closed. Thus, ShowModal does not return until the form closes. When the form closes, it returns the value of the ModalResult property. To close a modal form, set its ModalResult property to a nonzero value.

Note: If the form contains buttons with a ModalResult property set to a value other than mrNone, the form automatically closes when the user clicks one of those buttons and returns the ModalResult value as the return value of ShowModal. You can check the return value against common return values using the global IsAbortResult, IsAnAllResult, IsNegativeResult, or IsPositiveResult functions.

SnapBuffer#

Specifies distance for screen snap. If ScreenSnap is true, SnapBuffer determines the maximum number of pixels that be between the form edge and the screen edge before the form snaps to the screen edge.

TaskbarHandler#

Embarcadero Technologies does not currently have any additional information.

Top#

Specifies the Y coordinate of the upper-left corner of a control, relative to its parent or containing control in pixels. Vcl.Forms.TCustomForm.Top inherits from Vcl.Controls.TControl.Top. All content below this line refers to Vcl.Controls.TControl.Top. Specifies the Y coordinate of the upper-left corner of a control, relative to its parent or containing control in pixels. Use Top to locate the top of the control or reposition the control to a different Y coordinate. The Top property, like the Left property, is the position of the control relative to its container. Thus, if a control is contained in a TPanel, the Left and Top properties are relative to the panel. If the control is contained directly by the form, it is relative to the form. For forms, the value of the Top property is relative to the screen in pixels.

UpdateDesignerCaption(AVisible: Boolean, AUpdateFrame: Boolean)#

Embarcadero Technologies does not currently have any additional information.

WantChildKey(Child: Control, Message: Message) Boolean#

Indicates whether the form processes keyboard input for a control it owns. WantChildKey is called by any control that the form owns when the control receives keyboard input. If WantChildKey returns true, the control performs no further processing in response to the keyboard input, instead deferring to its parent form to respond to the keystroke. In its default implementation, WantChildKey always returns false; it is overridden in TActiveForm to implement certain ActiveX functionality.

WindowState#

Represents how the form appears on the screen. Set WindowState to minimize, maximize, or restore the form window. Read WindowState to determine whether the form is minimized, maximized, or in a normal state.

set_PopupParent(Value: CustomForm)#

Embarcadero Technologies does not currently have any additional information.