This may sound stupid but what is the difference between, assingning a value to a variable or calling a function in form's constructor and in OnCreate?
Use OnCreate to perform special processing when the form is created and is invoked by TCustomForm’s constructor. Either implement this event or override the constructor of the form; do not do both. Any objects created in the OnCreate event should be freed by the OnDestroy event.
When a form is being created and its Visible property is true, the following events occur in the order listed:
1. OnCreate
2. OnShow
3. OnActivate
4. OnPaint
Note: Use of the OnCreate event is discouraged in C++Builder because it can interact badly with the form’s constructor. It is recommended that you override the form constructor instead.
I copied from the C++Builder help. I think is a good explanation
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.