Mega Code Archive

 
Categories / Delphi / Examples
 

Changing form inheritance

Once a form has been created it is possible to change its ancestor class to another form in your project. TForm1 = class(TForm) TForm2 = class(TForm) Now I want to inherit TForm2 from TForm1 instead of TForm. First, in the pascal unit we make the change: TForm2=class(TForm1) we open the form, and view it as text (ALT+F12) and REPLACE object Form2: TForm2 with INHERITED Form2: TForm2 Thanks to J.M. Stoorvogel for providing this information on Quality Central (http://qc.borland.com)