我有“的InitializeComponent”的InitializeComponent在C#(在目前的情况下不存在)
的Visual Studio所著我的问题:在目前情况下不存在名称“buttonEDYTUJ_Edytuj”。
Controls.Add(buttonDODAJ);
buttonDODAJ = new Button();
buttonDODAJ.Text = "Dodaj";
buttonDODAJ.Click += new System.EventHandler(buttonDODAJ_Dodaj);
buttonDODAJ.Location = new Point(20, 50);
InitializeComponent();
下面的代码来自类的构造函数。
你试着创建它之前添加按钮;不管你在调用Controls.Add时buttonDODAJ包含的是什么,它都不是你想象的那个按钮。 – 2013-04-26 11:23:43