![]() You can also use visual form inheritance to customize an application for different clients without duplicating any source code or form definition code-you inherit the specific versions for a client from the standard forms. ![]() For example, if you prepare a standard parent form with a toolbar, a logo, default sizing and closing code, and the handlers of some Windows messages, you can then use it as the parent class for each of the application's forms. If the program has multiple forms, some of which are very similar or simply include common elements, then you can place the common components and the common event handlers in the base form and add the specific behavior and components to the subclasses. It mostly depends on the kind of application you are building. But what is the advantage of visual form inheritance? In short, instead of creating a form based on TForm, you can inherit a form from an existing form, adding new components or altering the properties of the existing components. ![]() Or, you can apply the object-oriented techniques, thanks to visual form inheritance. When you need to build two or more similar forms, possibly with different event handlers, you can use dynamic techniques, hide or create new components at run time, change event handlers, and use if or case statements.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |