Problems with visual inheritance, Visual Studio 2008 C#

635 views Asked by At

I have this problem with Visual Studio 2008 C#. There's a base form and a number of Windows forms that inherit from it. (Yes, I think I've compiled the base form before I tried to inherit from it.)

The derived forms compile smoothly, without errors, but they display only what they inherited from the base form. In other words, all derived forms look and behave exactly like the base form at run time, even though they are different at design time--they have many controls not found on the base form.

Has anyone ever had this problem before, and how was it solved?

1

There are 1 answers

0
user727395 On

The issue was resolved by specifying which form appears first at runtime. This was done by naming the form in Program.cs, as follows:

Application.Run(new DerivedForm());

Previously, the name of the base form appeared in the parentheses above.