Extending windows forms controls in compact framework

Nov 3 2003 7:26 AM
I need to extend some of the windows forms controls (eg. System.Windows.Forms.Button), so my code looks like: public class MyButton: System.Windows.Forms.Button { public MyButton } Now, I need tu put that button on my new form. One way to do this is: I put Windows.Forms.Button on my form from the toolbar and give him name button1. Next, I go in code of my form and change type of button1 from System.Windows.Forms.Button to MyButton (in function InitializeComponent too). When I start program (in emulator) everything is ok and MyButton is shown on the form. But, when I go back to designer I don't see button1 on the form! Designer is reporting some strange errors (eg. member not found, assembly not exist, ...). When I start my program again everything is ok. Does anyone know what is a problem.

Answers (2)