TCnTimer Class

Implements a timer that raises an event at user-defined intervals. This timer is optimized for use in Windows Forms applications and must be used in a window.

Namespace: CNClrLib.Component.Timer
TComponent
  CNClrLib.Control.Base.TClrBaseComponent
    CNClrLib.Component.Timer.TCnTimer
type
 TCnTimer = class(TClrBaseComponent)
 end;

The TCnTimer type exposes the following members.

Show:
 NameDescription
Create(TComponent)

Creates and initializes a TCnTimer instance. (Overrides TClrBaseComponent.Create(TComponent).)

Destroy

Frees the resources allocated with a TCnTimer instance. (Overrides TClrBaseComponent.Destroy.)

Top
Show:
 NameDescription
DefaultClrObject

Get the common language runtime object interface for this component. (Inherited from TClrBaseComponent.)

Enabled

Gets or sets whether the timer is running.

Interval

Gets or sets the time, in milliseconds, before the Tick event is raised relative to the last occurrence of the OnTick event.

Top
Show:
 NameDescription
Dispose

Releases the resources used by the Component. (Inherited from TClrBaseComponent.)

DoGetDefaultClrObject

Represents method DoGetDefaultClrObject. (Inherited from TClrBaseComponent.)

DoGetDotNetBaseComponent

Represents method DoGetDotNetBaseComponent. (Overrides TClrBaseComponent.DoGetDotNetBaseComponent.)

GetClrObject

Represents method GetClrObject. (Inherited from TClrBaseComponent.)

RegisterEventCallBack(ClrWString,Pointer)

Add an event to the instance using the specified event name and function pointer which is the event handler. The RegisterEventCallBack method does not directly add the event handler to the event. A hooking mechanism is used such that if the event is fired, the hook event is also fired which in turn calls the function pointer. (Inherited from TClrBaseComponent.)

RegisterEventSource

Register the Delphi object which will raise the .Net event handler. (Inherited from TClrBaseComponent.)

Start

Starts the timer.

Stop

Stops the timer.

UnRegisterEventCallBack(ClrWString,Pointer)

Remove an event from the instance using the specified event name and function pointer which is the event handler. (Inherited from TClrBaseComponent.)

UnRegisterEventSource

Unregister the Delphi object which raised the .Net event handler. (Inherited from TClrBaseComponent.)

Top
Show:
 NameDescription
OnTick

Occurs when the specified timer interval has elapsed and the timer is enabled.

Top

See C:\Users\Public\Documents\CrystalNet Technologies\.Net VCL for Delphi Demo Folder after installation for examples of how to use this component.