Solved

Inherited forms don't show up in VS designer

Posted on 2004-04-20
2
345 Views
Last Modified: 2008-12-11
Visual inheritance was working just fine until now. The designer shows the parent form OK but the inherited ones gave me this error:
 
System.Windows.Forms.Design.IEventHandlerService service already exists in the service container. Parameter name: serviceType
 
Now the designer has changed its message and what I get is "Object reference not sent to an instance of an object". I opened the task list to see in which file the error was and there's nothing in the file column of the list. If I double click the task it just places me on the first line of code in the file where the form is declared.
 
The application still works fine though so I guess this must be an error with Visual Studio and not with my code.

0
Comment
Question by:SergioFlorezM
2 Comments
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 200 total points
ID: 10873675
I had problem similar to that and I found that some parent form's events (like the Load event) are runned in the IDE when child forms are displayed.

Try removing the code from these events.
0
 
LVL 8

Expert Comment

by:nishikanth
ID: 10875096
This seems to have something to do with inheriting a Form_Load function from the base form. remove the Form_Load form the template and you will stop getting this error.
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Flash (http://en.wikipedia.org/wiki/Adobe_Flash) has evolved over the years to where it has become a masterful tool for displaying content screen.  It has excellent layout placement, UI precision as well as rendering capabilities. This, along with t…
It seems a simple enough task, yet I see repeated questions asking how to do it: how to pass data between two forms. In this article, I will show you the different mechanisms available for you to do just that. This article is directed towards the .N…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question