Need help with windows form inheritance

N

Nathon Dalton

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
 
N

Nathon Dalton

Oh, darn it. I see why I'm not getting any replies. I put this in the wrong
area. Sorry everyone!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top