Q: Advice / Tip on inheritance.

  • Thread starter Thread starter Martin Arvidsson, Visual Systems AB
  • Start date Start date
M

Martin Arvidsson, Visual Systems AB

Hi!

I am going to create a common form for use on reporting.

It may also be possible that i add functionality to the form that the report
forms are inherited from, such as buttons, etc.

I want this to become available in the inherited forms. Thats the easy part.

But, are there any traps, when doing this, lets say, the layout will go nuts
on the inherited forms?

Any guides, links would be appreciated.

Regards
Martin
 
Martin said:
Hi!

I am going to create a common form for use on reporting.

It may also be possible that i add functionality to the form that the
report forms are inherited from, such as buttons, etc.

I want this to become available in the inherited forms. Thats the
easy part.

But, are there any traps, when doing this, lets say, the layout will
go nuts on the inherited forms?

Any guides, links would be appreciated.

What I heard is that visual inheritance isn't the most stable part of
vs.net 2005. I'd go for user controls instead.

FB

--
------------------------------------------------------------------------
Lead developer of LLBLGen Pro, the productive O/R mapper for .NET
LLBLGen Pro website: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------
 
Martin said:
I am going to create a common form for use on reporting.

It may also be possible that i add functionality to the form that the report
forms are inherited from, such as buttons, etc.

I want this to become available in the inherited forms. Thats the easy part.

But, are there any traps, when doing this, lets say, the layout will go nuts
on the inherited forms?

I'd second what Frans said, if you plan on actually using the designer
to tweak these forms, as opposed to doing it in code. A lot of stuff
becomes read-only in descendants, even when there's no logical necessity
for it.

I have had good results with careful coding, but that was possible
because I didn't need to rely on the designer, and I still used
UserControl as a central way of plugging e.g. document views into a tab
control.

-- Barry
 

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

Back
Top