The ClassInitialize class function is called for each object created by a TCE class.
Syntax |
ClassInitialize() |
Return value |
No |
Parameter |
No |
Notes
If multiple objects of an object structure are created, the ClassInitialize function is called from front to back, i.e. first at the topmost object and then in the child objects.
Example:
For example, the ClassInitialize function from the Start object is used to provide a form for user input.
Create a class that is called "ProgramStart" for example. In the class editor of this class, under Forms, you create a form named MainWindow. Then create the "ClassInitialize" function under Functions. In this function, you enter the following code:
Function ClassInitialize() As Void
MainWindow.Show
End
Function
Now start the debugger for the ProgramStart class. You will notice that an empty window opens.