1. Computing

Implementing the OnBeforeCreate and OnAfterCreate Events for Delphi Forms

By September 16, 2011

Follow me on:

in Delphi Forms :: The TForm's OnCreate event is called when the form is created. Usually, you would write an OnCreate event handler to perform special processing when the form is created - such as setting any startup information (initial control property values, for example) for form operation.

If you are using visual form inheritance to have forms that inherit from some "base" forms, you might need to execute custom "startup" code for each inherited form. What if you need to put some common code in the TBaseForm implementation that needs to be executed when all the code in the OnCreate event handlers is executed?

Read the full article to learn how to Override DoCreate to Implement OnAfterCreate / OnBeforeCreate


Comments are closed for this post.
Leave a Comment

Line and paragraph breaks are automatic. Some HTML allowed: <a href="" title="">, <b>, <i>, <strike>

©2014 About.com. All rights reserved.