[Overview][Classes][Index] Reference for unit 'CustomTimer' (#lcl)

TCustomTimer.Create

Create - constructor for TCustomTimer: calls inherited Create, sets up handle and initializes timer interval.

Declaration

Source position: customtimer.pas line 49

public constructor TCustomTimer.Create(

  AOwner: TComponent

); override;

Arguments

AOwner

  

Component which owns the timer class instance.

Description

Create is the overridden constructor for the class instance. Create calls the inherited constructor using the component in AOwner as the owner for the class instance.

Create sets the default values for properties in the timer class instance; the timer Interval is set to 1000ms (1 second) and the Enabled property is set to True. The internal handle for the timer instance is set to the value which represents an invalid or unassigned handle (-1).

Change the value in the Interval property to alter the frequency of the timer notification.

Assigned an object procedure to the OnTimer event handler to perform actions needed when the timer Interval has expired.

See also

TCustomTimer.Interval

  

The Interval (in milliseconds) for timer notifications.

TCustomTimer.Enabled

  

Indicates if the timer is ready to start.

TCustomTimer.OnTimer

  

Event handler signalled when the Interval for the timer has elapsed.

TComponent.Create


Version 4.0 Generated 2025-05-03 Home