System.Classes.TDataModule.OnCreate
Delphi
property OnCreate: TNotifyEvent read FOnCreate write FOnCreate;
C++
__property TNotifyEvent OnCreate = {read=FOnCreate, write=FOnCreate};
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
event | published | System.Classes.pas System.Classes.hpp |
System.Classes | TDataModule |
Description
Occurs when an application instantiates a data module.
Write an OnCreate event handler to take specific actions when an application instantiates a data module. For example, if a data module contains database and dataset components, an application may establish a database connection immediately. If the data module contains timers, the application may initialize them.
Note: Use of the OnCreate event is discouraged in C++ because it can interact badly with the data module's constructor (see OldCreateOrder). It is recommended that you override the constructor instead.
OnCreate is an event handler of type System.Classes.TNotifyEvent.