Question about visual inheritance

  • Thread starter Thread starter Bart Schelkens
  • Start date Start date
B

Bart Schelkens

Hi,

i've created a base-form from which all the forms in my application need to
inherit.

This works just fine.
I've put some buttons on my base-form.
They are displayed correctly, only if my inheriting form is bigger than my
base-form, the buttons stay at the position where i've put them on my
base-form.

How can I change that?

Greetings.
 
Did you try to use the Anchor property of your button(in the base form) ?

Ernest
 
Yes, but when i anchor it to the bottom right, it still has the same
problem.
 
When I played with Visual Inheritance (until I eventually gave up), seems to
me you had to scope your controls as Protected, instead of the default
Friend.

Greg
 
I tried it and it worked fine, thx.


Greg Burns said:
When I played with Visual Inheritance (until I eventually gave up), seems to
me you had to scope your controls as Protected, instead of the default
Friend.

Greg

form)
 
Glad to hear it worked.

Backup frequently. I can't tell you how many times I designed a child form,
that the IDE would suddenly remove all the added controls.

Have you ran into this error yet? I got so frustrated seeing it, that I
stopped working with visual inheritance.

"An error occurred while loading this document. Fix the error, and then try
loading the document again. The error messge follows:
The designer must create an instance of type 'FooBar' but it cannot because
the type is declared as abstract."

(Usually recompiling, will fix that. Make sure you have all [Design] forms
closed in the IDE first!. Restarting the IDE sometimes helped too.)

I had some success, using code like this to get around certain issue with
the designer. But, again it was just too frustrating.

#If DEBUG Then
Public Class Foo
#Else
Public MustInherit Class FooBar
#End If

good luck!
Greg
 
I haven't had that error just yet.
Might still come though.


Greg Burns said:
Glad to hear it worked.

Backup frequently. I can't tell you how many times I designed a child form,
that the IDE would suddenly remove all the added controls.

Have you ran into this error yet? I got so frustrated seeing it, that I
stopped working with visual inheritance.

"An error occurred while loading this document. Fix the error, and then try
loading the document again. The error messge follows:
The designer must create an instance of type 'FooBar' but it cannot because
the type is declared as abstract."

(Usually recompiling, will fix that. Make sure you have all [Design] forms
closed in the IDE first!. Restarting the IDE sometimes helped too.)

I had some success, using code like this to get around certain issue with
the designer. But, again it was just too frustrating.

#If DEBUG Then
Public Class Foo
#Else
Public MustInherit Class FooBar
#End If

good luck!
Greg


Bart Schelkens said:
I tried it and it worked fine, thx.


seems on
my
 
Back
Top