473,396 Members | 2,147 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,396 software developers and data experts.

Calling inherited form - form loads and is a creature somewhat lik

I don't know what I am doing wrong - I have two forms, I will call them A and
B. B is a class inherted from A. I am calling B from A with B.ShowDialog().
When B loads, it is a creature somewhat like the first form and the form it
should be. Some of the controls from A are now on B and fully functional.
Why are they showing up on my new form? It only seems to happen when B is
inherited from A. Hope this isn't confusing. Thank you.
Nov 17 '05 #1
2 1029
"nidget" <ni****@discussions.microsoft.com> wrote in message
news:6A**********************************@microsof t.com...
I don't know what I am doing wrong - I have two forms, I will call them A
and
B. B is a class inherted from A. I am calling B from A with
B.ShowDialog().
When B loads, it is a creature somewhat like the first form and the form
it
should be. Some of the controls from A are now on B and fully functional.
Why are they showing up on my new form? It only seems to happen when B is
inherited from A. Hope this isn't confusing. Thank you.


This is what is meant to happen. You chose to inherit from A so B gets the
controls of A. Why did you inherit from A?

Michael
Nov 17 '05 #2
Thank you for your response. The reason I am inheriting is because I want to
be able to access a variable that I am using in the other class. Is there
another way to make the variable in class A visible to class B? Thank you.

"Michael C" wrote:
"nidget" <ni****@discussions.microsoft.com> wrote in message
news:6A**********************************@microsof t.com...
I don't know what I am doing wrong - I have two forms, I will call them A
and
B. B is a class inherted from A. I am calling B from A with
B.ShowDialog().
When B loads, it is a creature somewhat like the first form and the form
it
should be. Some of the controls from A are now on B and fully functional.
Why are they showing up on my new form? It only seems to happen when B is
inherited from A. Hope this isn't confusing. Thank you.


This is what is meant to happen. You chose to inherit from A so B gets the
controls of A. Why did you inherit from A?

Michael

Nov 17 '05 #3

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

Similar topics

4
by: Gibby Koldenhof | last post by:
Hiya, I'm setting up some code in the spirit of Design Patterns, OOP, etc. All nice and well, it handles pretty much all OO style things and serves my purposes well. There's one last final...
5
by: Dave Veeneman | last post by:
I'm using inheritance more than I used to, and I find myself calling a lot of base class methods. I generally call a base method from a dreived class like this: this.MyMethod(); I'm finding...
24
by: Nak | last post by:
Hi there, I have some inherited forms that I wish to make "localizable", unfortunately none of the items I wish to be "localizable" are actually being "localized". For example, I have a few of...
3
by: Jeff User | last post by:
Hello I am using C#, .net1.1 Vis Studio 2003 I am using homeBase.aspx.cs page as a base for several other aspx/aspx.cs web pages. The base page handles some operations that are common to all...
4
by: asad.naeem | last post by:
hi to all this is the problem about inheritence. I have designed a form with some essential controls which are required for every form which will inherited from it. for example i have Button1 on...
3
by: senfo | last post by:
I developed a Windows control in VS 2005 that inherits from the PictureBox Control that adds the ability to select images in a Windows application. It is, however, experiencing a strange issue...
0
by: saijin | last post by:
I'm planning to call a list of data from an XML file but when I duplicate the content inside the <data></data> it is not showing anything Here's the ActionScript 3.0 import...
2
by: DevInCode | last post by:
My class is Creature which has subclass called Human I have a vector of * creatures vector<Creature> * creatures ..... It is filled with dozens of creature objects. However I want to make...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.