Inheriting forms and strange behaviour

  • Thread starter Markus Rytterkull
  • Start date
M

Markus Rytterkull

Hi!

I have a basic form that has a menu, toolbar, an icon to
show if the user is offline/online and some basic
functionality that all my forms should have. All other
forms inherit my UIBase, instead of Form.

It works fine for a while but eventually I get some
errors:
- Object type cannot be converted to target type
- Member not found
- Specific cast not valid

These errors do not have a file or line associated with
them. And I get LOTS of them.

TO get rid of these errors, I change the inheritance to
Form and then when the errors disappear, change back to
UIBase again.

Anybody have a solution or explanation to this?

/ Markus
 
G

Guest

i didn't lost the designer support. i had to create a interface, and the base form and all others have to use it. so the designer works. then on every control is a small icon, that it is inherit.
In the normal Framework I could add some more Controls to the form(in the designer), but not with the Compact Framework. Does anyone knows why? is there an other way?

Philipp
 
G

Guest

i didn't lost the designer support. i had to create a interface, and the base form and all others have to use it. so the designer works. then on every control is a small icon, that it is inherit.
In the normal Framework I could add some more Controls to the form(in the designer), but not with the Compact Framework. Does anyone knows why? is there an other way?

Philipp
 
C

Chris Tacke, eMVP

It's well documented that the CF designer doesn't support visual
inheritance.

--
Chris Tacke, eMVP
Co-Founder and Advisory Board Member
www.OpenNETCF.org
---
---
Principal Partner
OpenNETCF Consulting
www.OpenNETCF.com



Philipp said:
i didn't lost the designer support. i had to create a interface, and the
base form and all others have to use it. so the designer works. then on
every control is a small icon, that it is inherit.
In the normal Framework I could add some more Controls to the form(in the
designer), but not with the Compact Framework. Does anyone knows why? is
there an other way?
System.Windows.Forms.Form is not supported. You may be able to compile but
you will lose designer support.
 

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

Top