// 设置属性
toAdd.Name="PictureBox5";
toAdd.Location= new Point(localX, localY);
toAdd.TabStop = false;
toAdd.Image=((System.Drawing.Image)(resources.GetObject("PictureBox5.Image")));//这一句它说: The type or namespace name 'resources' could not be found (are you missing a using directive or an assembly reference?)
我该怎么设置它的图片呢?
// 设置待添加按钮的事件
toAddButton.MouseEnter += new System.EventHandler(this.btn_MouseEnter);
toAddButton.MouseLeave += new System.EventHandler(this.btn_MouseLeave);
toAddButton.Click += new System.EventHandler(this.btn_Click);