Question

I have a number of existing forms which I need to convert to inherit from another base form TfrmBase instead of the normal TForm. This base form is a TForm with a little added functionality. All I do to convert them is...

  1. add the base form's unit to the uses clause
  2. change class(TForm) to class(TfrmBase).

When I run the application, the FormCreate even is executed successfully, but when it comes to showing this form (application's main form), I get an exception:

Class TPanel not found

I do in fact have a panel on this form which was converted. The uses clause does in fact have Vcl.ExtCtrls added to it, where the TPanel comes from.

What do I need to do to fix this? Am I doing the right steps to convert these forms?

Was it helpful?

Solution

I found out my problem while I was typing this question, which probably no one else would have thought to point out...

All I had to do is remove this base form from the automatically created forms, and it worked. Something I should have done in the first place.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top