このバグは突然始まりました。
一部のコントロールの場所を変更していますが、VisualStudio2010はInitializeComponent
関数を書き直しています。new
問題は、一部の関数が削除されることです。
前のコード:
private void InitializeComponent()
{
this.advButton1 = new AdvButton();
this.advButton2 = new AdvButton();
this.advButton3 = new AdvButton();
this.advButton4 = new AdvButton();
this.SuspendLayout();
デザイナでボタンを移動した後のコード:
private void InitializeComponent()
{
this.SuspendLayout();
これは、フォームと同じ名前空間の下にある自分のユーザーコントロールでのみ発生します。
別の問題(一貫性がない):関数
を見て、フォームにユーザーコントロールを追加していInitializeComponent
ます-コントロールがどこにも表示されません。
Visual Studio 2010をアンインストールし、Service Pack 1を使用して再インストールしました
。何かアイデアはありますか?