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

Need help with windows form inheritance

I have created a project with a form called SetupBodyTemplate. I have
created a second inherited form called Demographics which inherits from
SetupBodyTemplate. I've created several of these templates that inherit from
the base form, but I'm getting some errors.

'DesignProject.SetupBodyTemplate.components' is not accessible in this
context because it is 'Private'.
'DesignProject.SetupBodyTemplate.components' is not accessible in this
context because it is 'Private'.

There are two errors per page that inherits SetupBodyTemplate. When I double
click the first one, it takes me to this bit of code and it complains (blue
underline) about the 'InitializeComponent()' line.

Public Sub New()
MyBase.New()

'This call is required by the Windows Form Designer.
InitializeComponent()

'Add any initialization after the InitializeComponent() call
End Sub

When I click on the second message, it takes me here and it complains (blue
underline) about the 'components' words.

Protected Overloads Overrides Sub Dispose(ByVal disposing As
Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub

I really need this to work. Can anyone tell me what I'm doing wrong?

Thanks,
Nathon
Nov 17 '05 #1
1 1232
Oh, darn it. I see why I'm not getting any replies. I put this in the wrong
area. Sorry everyone!

"Nathon Dalton" <na****@hotmail.com> wrote in message
news:O8**************@TK2MSFTNGP12.phx.gbl...
I have created a project with a form called SetupBodyTemplate. I have
created a second inherited form called Demographics which inherits from
SetupBodyTemplate. I've created several of these templates that inherit from the base form, but I'm getting some errors.

'DesignProject.SetupBodyTemplate.components' is not accessible in this
context because it is 'Private'.
'DesignProject.SetupBodyTemplate.components' is not accessible in this
context because it is 'Private'.

There are two errors per page that inherits SetupBodyTemplate. When I double click the first one, it takes me to this bit of code and it complains (blue underline) about the 'InitializeComponent()' line.

Public Sub New()
MyBase.New()

'This call is required by the Windows Form Designer.
InitializeComponent()

'Add any initialization after the InitializeComponent() call
End Sub

When I click on the second message, it takes me here and it complains (blue underline) about the 'components' words.

Protected Overloads Overrides Sub Dispose(ByVal disposing As
Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub

I really need this to work. Can anyone tell me what I'm doing wrong?

Thanks,
Nathon

Nov 17 '05 #2

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

Similar topics

0
by: Ashutosh Bhalerao | last post by:
Hi, I have a solution file(VB.Net) where some of the forms have already been created. Now I want to derive all these forms from mybaseform to move common functionality there. So the original...
9
by: Pedro | last post by:
Hi, all. I'm having a problem which vb developers had for certain al least once. I have my base form, declared as musthinherit; Public MustInherit Class frmsdvPrincipal
2
by: Darryn Ross | last post by:
Hi.. I have a standard windows app in C#. The project contains a two forms and one class that i have created. I want both of the forms to inherit from the class but i am getting an error reading...
0
by: Kevin | last post by:
This problem has stumped me for almost two years now. In a nutshell... 1) I create a textbox class, and set the font to Tahoma 8 2) I drop the textbox class on a form, and set other properties...
4
by: Jason Huang | last post by:
Hi, In my ASP.Net 1.1, C#, I have two windows forms, one is frmContactPerson, another is frmContactAddress. These two forms has many same Controls, except in one GroupBox they have different...
2
by: Fred Flintstone | last post by:
This is driving me crazy. I've put together a perfect, easy example of the problem. What I'm doing is creating a custom control, prepopulated with 4 items when dropped on a form: - Create a new...
8
by: **Developer** | last post by:
I have a control called MyPanel that inherits from Panel. Also a control called MyRTB that inherits from RichTextBox. They are used on a form as follows: MyPanel in on the form and MyRTF is...
5
by: Ming Yeung | last post by:
I was wondering if .NET had the equivalent of Frames, Global Objects, and most importantly DataModules like in Delphi?
23
by: Chukkalove | last post by:
Im sorry, I dont know the correct description for a hierarchy of parent and child forms. I have a main form that opens a child form modally. This child form in turn opens it's own child form...
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
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
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: 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...

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.