How to create multiple picture boxes and keep them?
问题 I want to create an ability for the user in my app to create pictureboxs everytime the user clicks on the main picturebox (I want to keep the pictureboxs and give an infinity picturebox creating ability to the User) The code: PictureBox Pic = new PictureBox(); Pic = pictureBox2; Pic.Left = e.X; Pic.Top = e.Y; Pic.Visible = true; 回答1: you need to register to the event of clicking the pictureBox and create a new pirtureBox when clicking on it: this.pictureBox1 = new System.Windows.Forms