Windows Forms Inheritance Bug ?

I have a 3 level inheritance.

class Level1 : System.Windows.Forms {}
class Level2: Level1{}
class Level3 : Level2 {}

in the load event from Level1 I call a overidable method, that in Level2 is override and in this I make some initialization for information on the form, DataBinding and one SqlDataAdapter, but when I whant to see the designer for the Level3 the designer show me errors, why

If this a problem in my whay of programming or must placed an attribute before the method, please write my what I must write.

Thanks,

Claudiu



Answer this question

Windows Forms Inheritance Bug ?

  • dsi

    Can you provide the sourcecode (constructors and Load only), and show us the error message that the designer gives

  • stridulence

    Is no aditional cod in constructor, and the problem, the bug is that the .Net not respond at anything, (task manager) - not responding, and the computer that I test have processor of 1,7GHz and 1Gb RAM.
  • MightyDubCats

    You forgot to paste the error message... (no additional code in the constructors )

  • Mr. Hanky

    1) public class Level1
    inherits System.Windows.Forms

    protected overridable Sub LoadInformation()
    'no code
    end sub

    private sub form_load(sender as object,e as EventArgs) Handles MyBase.Load
    LoadInformation()
    end sub

    end class

    2) public class Level2
    inherits Level1

    protected overrides Sub LoadInformation()
    Dim sqlDataAdapter as new SqlDataAdapter(..,...)
    sqlDataAdapter.Fill(_dataSet)
    'with information resulted fill an listView
    end sub

    end class

    3)public class Level3
    inherits Level2

    'nothing
    end class

    If is needed I can make a small project and attached. thanks


  • Windows Forms Inheritance Bug ?