Solved

Problem with Form Inheritance

Posted on 2007-11-19
4
191 Views
Last Modified: 2010-04-23
Hello, I don't seem to be able to have a simple Form Inheritance in my project.
I have a separate project in my solution with a single .vb form, with the following code:

------------------------
Public Class FormsCommon

    Public ErrorPresent As Boolean
    Public AlreadyDone As Boolean
    Public TableCode As String

    Private Sub FormsCommon_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub
End Class

Public Interface CommonInterface
    Sub ControllaForm()
End Interface
-------------------------------

Then I try to create, in another project, a VB form that inherits from this one:

------------------------------
Public Class DemographicDataInformedConsent
    Inherits Humanitas.FormsCommon

    TableCode = "SDEM"
------------------------------

...but I simply get: "TableCode is not declared".

What am I doing wrong?
0
Comment
Question by:Emanuele_Ciriachi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 6

Accepted Solution

by:
cottsak earned 256 total points
ID: 20317911
you might need to add the 1st prject as a reference to the second. before you do that the parent class wont be visible.
0
 
LVL 8

Expert Comment

by:doraiswamy
ID: 20318205
You would also need to add

imports humanitas

at the beginning of the code for the second project
0
 
LVL 1

Author Comment

by:Emanuele_Ciriachi
ID: 20319364
Importing the base class project in the forms which extend it worked, thank you.
0
 
LVL 1

Author Closing Comment

by:Emanuele_Ciriachi
ID: 31410066
Nice and quick, managed to get me back on track and as such I give an "A". Would have liked an example to make the solution even more complete.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question