repost: How to... With inherited control 
Author Message
 repost: How to... With inherited control

(reposted because of the newsgroups mess)

I'm building a test app in vb.net.
Due to the lack of rebar support, I decided to temporarily do it with an
inherited panel, one that draws the rebar look.

So I created a panel using the IDE, all fine.

Next I created a class to inherit the panel, doing this:

Public Class PanelEx
   Inherits Panel
   Protected Overrides Sub OnPaint(ByVal e As
System.WinForms.PaintEventArgs)
      MyBase.OnPaint(e)
      ......
      'Boring Drawing Stuff
      ......
   End Sub
End Class

Then I replaced the System.Winforms.Panel with PanelEx on the form code. I
run the project, all works as expected, but if I reopen the form in design
mode, I get:

"An error occured while loading the document. Fix the error, and then try to
load the document again. The error message follows:
Could not create the component 'Panel1' because the type 'PanelEx' could not
be loaded. Please make sure that the assembly that contains the type is
referenced. If this type is a part of your development project, make sure
that the project has been successfully built."

Any hints as to what I'm doing wrong? Is this a bug in Beta1?

Best Regards,

Miguel Santos



Sun, 01 Jun 2003 08:52:14 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Controls Inheriting Other Control's Properties

2. Controls Inheriting Other Control's Properties

3. Controls Inheriting Other Control's Properties

4. Controls Inheriting Other Control's Properties

5. custom form control: Cannot view design view of forms that inherit this form

6. Tab Control in inherited forms

7. Inheriting from controls

8. Inherited form and remembering controls

9. inherited control question

10. Move controls on inherited form?

11. Inherits - TreeNode Control

12. Creating/Inheriting WinForm controls

 

 
Powered by phpBB® Forum Software