abstract form

  • Thread starter Thread starter Cyrus
  • Start date Start date
I think you can *code* it, what you most likely cannot do is to use the
designer to create abstract forms. What's more, you can also have problems
with using designer to edit forms inherited from the abstract form (at least
this is true for components).
 
Dima,

Would you happen to know the answer to my question:

"Form inheritance problem" which is a few threads
below?...

Regards,

Serge.
-----Original Message-----
I think you can *code* it, what you most likely cannot do is to use the
designer to create abstract forms. What's more, you can also have problems
with using designer to edit forms inherited from the abstract form (at least
this is true for components).

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

Cyrus said:
why i cannot code a form as abstract in order for
other form to inherite
it
in C#?
thz

.
 
* "Cyrus said:
why i cannot code a form as abstract in order for other form to inherite it
in C#?

You can actually define a form as abstract, but this will break the
compatibility with the Windows Forms designer. The Windows Forms
designer expects the form not to be abstract and to provide a
parameterless ctor.
 
If so, why it allows a form to be inherite?

Herfried K. Wagner said:
You can actually define a form as abstract, but this will break the
compatibility with the Windows Forms designer. The Windows Forms
designer expects the form not to be abstract and to provide a
parameterless ctor.
 
Just don't make the form abstract, but create empty virtual methods - it
behaves like an abstract form, but works in the GUI too. Had a similar
problem with UserControls.
 
Back
Top