Add Inherited Form...

My MCSD training kit says that in Visual Studio, you have the ability to add an inherited form by clicking Project -> Add Inherited Form... . However, In Visual C# and Visual C++ Express Edition (I don't know about Visual Basic Express), this option seems to be missing.

I also notice that you can't add an inherited form via Add new item... or Add New File... .

Don't get me wrong, I won't really mind missing this feature from the express editions (I wasn't aware of the feature until my MCSD training kit pointed me to the menu item). However, the examiners will probably not like that excuse.

Should I just skip the chapter on inherited forms

I wonder if I can inherit a form manually

class DerivedForm : BaseForm
{
...
}




Answer this question

Add Inherited Form...

  • merrickchaffer

    Inheriting a form is exactly what you did in your first post.

    The Add Inherited Form simply allows you select which form you want to inherit from and that's it.

    I find it quicker to simply add a new form and simply change the base class to the form I want to inherit from.

  • Veeral

    In case there are any other novices out there reading this thread, manually changing inheritance, at least in Visual Basic 2005 Express, involves the following steps: Show All Files in the Solution Explorer, expand the form you wish to derive, and then open Form.Designer.vb, which is different from the typical layout view. This is where the code must be altered.

    Happy New Year.


  • swathi_challa

    Hi,



    I tried it in VC++ Express. I just added a new form, goto the .h code file, added an include statement to add the header of the form to inherit and changed the Inherited object (System::Windows::Forms::Form) to my form...
    Try it... Big Smile





    cheers,



    Paul June A. Domag

  • Ian Bates

    Unfortunately, I am then required to enter designer mode for the form. Then I get an unfriendly message from the forms designer (Red with the error sign), saying it could not display the form due to private members. Perhaps this is why the Inherited Forms feature was disabled.

    I wonder if I can mention the manually inherited forms workaround in the exam... Big Smile, but then what about adding controls to the form... Tongue Tied



  • Add Inherited Form...