This bug started out of the blue.
I’m changing some controls locations and Visual studio 2010 is re-writing the InitializeComponent function.
The problem is that it deleting some of the new functions.
Code before:
private void InitializeComponent()
{
this.advButton1 = new AdvButton();
this.advButton2 = new AdvButton();
this.advButton3 = new AdvButton();
this.advButton4 = new AdvButton();
this.SuspendLayout();
code after moving the button in the designer:
private void InitializeComponent()
{
this.SuspendLayout();
This happens only with my own user control, which are under the same namespace as the form.
Another problem (not consistent):
I’m adding my usercontrol to the form, looking at the InitializeComponent function – I don’t see the control anywhere.
I’ve already uninstalled Visual Studio 2010 and re-install it with its Service Pack 1.
Any ideas?
Finally solved it by changing the class
AdvButtonfrom internal to public.