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

Inheritence in forms

Pakmarshal
Hi everyone,

I am developing a windows based application in VS2005. I want all my form to be inherits from one of my class e.g.ParentClass but indeed the windows forms already inherits windows.forms.form class. what I have tried is that, I inherit "windows.forms.form" in "ParentClass" and all forms inherits my "ParentClass". But in this case when I view the design of the form IDE gives error. Please guide my in this regard.

Thanks and Regards
Feb 23 '10 #1

✓ answered by tlhintoq

So the "simple answer" was to mark it 'public' and 'inherits' from... ?
So the simple answer was to follow the instructions on MSDN. Got it.

3 1082
tlhintoq
3,525 Expert 2GB
That shouldn't be a problem. What you've described sounds fine.
The same thing is done in this tutorial, only using UserControl instead of Form.
In the end all of these items inherit from Control.
http://bytes.com/topic/c-sharp/insig...ister-part-1-a
Feb 23 '10 #2
tlhintoq
3,525 Expert 2GB
So the "simple answer" was to mark it 'public' and 'inherits' from... ?
So the simple answer was to follow the instructions on MSDN. Got it.
Feb 24 '10 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Jan Elbæk | last post by:
Hi, I would like to make a base form in my project - which (almost) all forms must inherit from. The baseform must have some visible elements (a toolbar, a topaligned panel and a picturebox and...
0
by: Dave L | last post by:
I want to create, via inheritance, my own UI control and use it in place of the stock .NET control in order to make system wide changes easily. For instance, I would inherit from Forms.Button and...
7
by: preetam | last post by:
Hi, This question is more towards design than towards c++ details. By looking at books on design patterns and various google threads on the same topic, I see that composition is favoured to...
2
by: bmsgharr | last post by:
On a web site that I am working on I have created a base page called public abstract class WebsiteBasePage : System.Web.UI.Page { ..... } The reason for this is to put standard code in it, for...
4
by: Eric Lemmon | last post by:
Hi, I created a base form and several forms inheriting from the base. I just found that all the forms need to be wider, so I increased the width of the base form. After recompiling, none of...
5
by: Neelesh Bodas | last post by:
This might be slightly off-topic. Many books on C++ consider multiple inheritence as an "advanced" concept. Bruce Eckel says in TICPP, volume 2 that "there was (and still is) a lot of...
3
by: Craig Smesny | last post by:
I have a form(Call it form 1) that I use as a base class for other forms in my application. it contains a a call to a function that passes its form name. Form 2 inherits from form 1. When it is...
2
by: Oblivion | last post by:
Hi All, I have an issue where I get an "Unhandled Exception" pop up box when an error occurs in an inherited base class even tho there's a try..catch written in the inheriting class to handle...
5
by: =?Utf-8?B?SmltSGVhdmV5?= | last post by:
I have an abstract class. I want to define a field and a few methods which reference the field defined for that abstract class. The field is defined in the abstract class but is populated in the...
0
by: tirumalab | last post by:
Hi all, im working on C#, in my current proj we're using one form as the base form and deriving it from all the forms ,its working fine with windows applicatons.But we want to develop the same...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.