473,385 Members | 1,562 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,385 software developers and data experts.

inherit a form

I am trying to make an instance of a form in another form after
inhereting it (with :) but it's not working,I can't see the class.Why
and how can I do it?
Another question,
If I have 2 classes I want to inherit what is the syntax: a:b,c is not
working.How to do it?
Thanks !
Nov 16 '05 #1
1 1855
juli,
If you inherit from a class, you do not need to make an instance of it
in the derived class. When you create the object of the derived class, it
has all the public and protected properties/methods of the inherited class.
Also, internally, the base class is instantiated anyway when the derived
class is instantiated. So you can use all methods of the inherited class as
if they were in the derived object (use this. to find out).

You cannot derive a class from 2 different classes in c#. Multiple
inheritance is not permitted in C#. You can implement 2 (or more) interfaces
though, but i dont think thats what you are looking for

Ranjan

--
http://dotnetjunkies.com/weblog/dotnut
"juli" <ji****@gmail.com> wrote in message
news:1f**************************@posting.google.c om...
I am trying to make an instance of a form in another form after
inhereting it (with :) but it's not working,I can't see the class.Why
and how can I do it?
Another question,
If I have 2 classes I want to inherit what is the syntax: a:b,c is not
working.How to do it?
Thanks !

Nov 16 '05 #2

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

Similar topics

6
by: Mohammad-Reza | last post by:
I wrote a component using class library wizard. In my component i want to in order to RightToLeft property do some works. I can find out if user set this property to Yes or No, But if He/She set it...
5
by: Mike L | last post by:
This is my first attempt at inheriting a class. I want to inherit textbox class to my derived class ClassNum. ClassNum will override the TextChanged, Leave, KeyPress and Enter methods. So,...
0
by: varun varun | last post by:
hello friend, while developing an asp.net application, i created a base form(say mybaseform1) with certain links on it. then i tried to inherit the same from in other application forms by...
4
by: David | last post by:
I have trying to have a webform inherit controls from another form and can't get it to work Say I have a form that saves the person's demographic info. ****one.aspx**** //I have an object...
0
by: Zhi | last post by:
i have base form that contains a public imagelist. the image list has several images in it. my child forms inherit this base form and the imagelist. the inheritted imagelist contains all the images...
2
by: Wu Qinliang | last post by:
I created a Windows form named myform1, and put some controls on it. I need another form named myform2. Because myform2 is similar to myform1, so I want myform2 to inherit from myform1, i.e: ...
3
by: Station Media | last post by:
Hi everybody, I need to create a custom button for all our internal applications, and i would like to know what is the best for this type of control(button), is it to inherit standard button or...
2
by: harvie wang | last post by:
Hi, I want to implement a common Form with special interface, such as MovePoint(double,double). I create a interface first: namespace ABC.Test { public Interface IMyWindowInterface { void...
1
by: Ronald S. Cook | last post by:
I have many forms in my Windows project. When I go to create an inherited form, I see all my forms in the list of choices. HOWEVER, if any form is marked as must inherit, then it doesn't show up...
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...
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...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...

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.