Delphi IDE (239)
Windows with Delphi (38)
Visual Basic (3539)
New related comments
Number of comments in the last 48 hours
The meaning of Runtime Error 217
Allowing Delphi to remove your empty methods
This article has not been rated yet. After reading, feel free to leave comments and rate it.
By default, Delphi removes any empty event handlers each time your save or rebuild your application. However, you may have noticed that it doesn't remove your methods--even if they're empty.
The secret to this phenomenon is that Delphi places event handlers in the published section of the form's class declaration. (This is the section between the classname specifier and the private section of the class declaration.) If you place your methods in the same section of the class declaration, as shown below, then it will not remove your method, even if empty.