Solved

Inherited forms don't show up in VS designer

Posted on 2004-04-20
2
347 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

696 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