Saturday, October 3, 2009

Delphi Basics : Using Inheritance in Dephi 7 - A Simple Example

1. Create a Standard Form as the Ancestor Form.




In the above example, I have added a InfoPower TwwDBNavigator,TwwDBGrid controls as well as a ADODataset and a DataSource all duly connected to each other.

2. Select File/New/Others to get the following Dialog


3. Click OK to get the inherited Form StdViewForm1 which looks exactly like the form that we created in (1) above.



4. Then, just adjust the command text property to read from another table and bingo, you have another module ready to go. Then just select File/Save As and add it to the menu item of your choice. That's it !

No comments:

Post a Comment