This is a migrated thread and some comments may be shown as answers.

inherit radform

5 Answers 289 Views
Form
This is a migrated thread and some comments may be shown as answers.
Sam
Top achievements
Rank 1
Sam asked on 04 Oct 2012, 09:37 PM
I've created RadForm1 and renamed it to MotherForm and put several components on it. Then I've created new RadForm(AlterForm) and inherit it from MotherForm. 
public partial class AlterForm : MotherForm

But in AlterForm designer I've got an error

The designer could not be shown for this file because none of the classes within it can be designed. The designer inspected the following classes in the file: DropForm --- The base class 'AdminControl.MotherForm' could not be loaded. Ensure the assembly has been referenced and that all projects have been built.



Where can be a problem?

5 Answers, 1 is accepted

Sort by
0
Accepted
Stefan
Telerik team
answered on 09 Oct 2012, 12:19 PM
Hello Jei,

Thank you for writing.

After you inherit the MotherForm, please close all designer windows and rebuild the project and the open the AlterForm in design time. 

Let me know how this works for you.

All the best,
Stefan
the Telerik team
RadControls for WinForms Q2'12 release is now live! Check out what's new or download a free trial >>
0
Sam
Top achievements
Rank 1
answered on 11 Oct 2012, 10:36 PM
I've restarted visual studio and then it started to work.
0
Stefan
Telerik team
answered on 12 Oct 2012, 06:57 AM
Great news. I am glad everything is now OK on your end.
 
Regards,
Stefan
the Telerik team
You’ve been asking for it and now it’s time for us to deliver. RadControls for WinForms Q3 2012 release is just around the corner. Sign up for a free webinar to see first all the latest enhancements.
0
Hatred
Top achievements
Rank 1
answered on 01 Feb 2013, 04:33 PM
Hi just tried what u said but my child form has no controls on it when Mother form has many i check the modifiers of the controls and they're all protected what can i do ? it just load with nothing on it .. thanks in advance
0
Plamen
Telerik team
answered on 06 Feb 2013, 06:45 PM
Hi Hatred,

I tried to reproduce the described behavior, but to no avail. My child form has the same controls as the parent form. I am attaching a sample project which demonstrates the desired behavior.

Let me know if you have additional questions.

Regards,
Plamen
the Telerik team
Q3'12 SP1 of RadControls for WinForms is out now. See what's new.
Josh
Top achievements
Rank 1
Veteran
commented on 14 Feb 2023, 02:14 PM | edited

Thanks!   Note for anyone else:   In 2023, The RadForm Inherits statement is in the designer.  You need to change it there and afterward, you need to close it and do a rebuild on the project. Otherwise you will get errors opening in design view.  

 

Dess | Tech Support Engineer, Principal
Telerik team
commented on 16 Feb 2023, 11:56 AM

Hi, Josh,

It is possible to create an inherited form by the Add New Item option in Visual Studio as well:

 

Tags
Form
Asked by
Sam
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Sam
Top achievements
Rank 1
Hatred
Top achievements
Rank 1
Plamen
Telerik team
Share this question
or