473,322 Members | 1,718 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Inheritance Error

I have two forms that are both derived from the same base class. When I try to
open these inherited forms in the windows form designer, I go back and forth
between the following two errors

1. Object reference not set to an instance of an object
2. The service System.Windows.Forms.Design.IEventHandlerService
already exists in the service container
Parameter name: serviceTyp

Does anyone know why I am getting such errors? Any solutions?
All help is greatly appreciated!! :

Thanks
Parveen
Nov 20 '05 #1
1 3425
"Parveen" <an*******@discussions.microsoft.com> schrieb
I have two forms that are both derived from the same base class.
When I try to open these inherited forms in the windows form
designer, I go back and forth between the following two errors:

1. Object reference not set to an instance of an object.
2. The service System.Windows.Forms.Design.IEventHandlerService
already exists in the service container.
Parameter name: serviceType

Does anyone know why I am getting such errors? Any solutions?
All help is greatly appreciated!! :)

Examine the code executed in/from the constructor of the base class. The
constructor is executed in the designer because it must create an instance
of the base class to display it.

If there's code in the base class that mustn't be executed when the Form is
opened in the designer, check the Designmode property (if me.designmode...).
It's true in that case.
--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: John Hunter | last post by:
I am using pycxx 5.2.2 to implement some extension code and have a problem relating to inheritance. I have a pure virtual base class and two concrete derived classes. In the code below, everthing...
2
by: AIM | last post by:
Error in msvc in building inheritance.obj to build hello.pyd Hello, I am trying to build the boost 1.31.0 sample extension hello.cpp. I can not compile the file inheritance.cpp because the two...
4
by: Roy Pereira | last post by:
I have an application that is composed of a set of "Content" dlls and a viewer application. The viewer calls a standard set of functions that are present in all the dlls. I maintain this by...
4
by: Dave Theese | last post by:
Hello all, The example below demonstrates proper conformance to the C++ standard. However, I'm having a hard time getting my brain around which language rules make this proper... The error...
10
by: jeffc | last post by:
When compiling the following program, I get an error on the line specified: The base class "B" cannot be initialized because it does not have a default constructor. If I remove the "virtual"...
1
by: Tony Johansson | last post by:
Hello! What does this mean. "The use of inheritance to provide various implementations of a single abstraction tightly binds these implementations to the abstarction. Therfore it, is difficult...
14
by: Steve Jorgensen | last post by:
Recently, I tried and did a poor job explaining an idea I've had for handling a particular case of implementation inheritance that would be easy and obvious in a fully OOP language, but is not at...
45
by: Ben Blank | last post by:
I'm writing a family of classes which all inherit most of their methods and code (including constructors) from a single base class. When attempting to instance one of the derived classes using...
3
by: kikazaru | last post by:
Is it possible to return covariant types for virtual methods inherited from a base class using virtual inheritance? I've constructed an example below, which has the following structure: Shape...
12
by: mijobee | last post by:
I'm very new to c++ and just writing some code to learn. I've run into a problem, with a javaish design, and want to know if there is any possible solution without modifying the design. I've read...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.