private void DragAndDropArea_Load(object sender, EventArgs e) { #region Areoload //load the areo into the form this.BackColor = Color.Black; MARGINS m = new MARGINS(); m.cxLeftWidth = -1; m.cxRightWidth = -1; m.cyBottomHeight = -1; m.cyTopHeight = -1; //set all value -1 to apply glass effect to the all of visible window DwmExtendFrameIntoClientArea(this.Handle, m); //end load areo code #endregion PictureBox newpic = new PictureBox(); newpic.Size = new Size(80, 70); newpic.BackColor = Color.Red; if (this.Name == "Dock1") { int addpicnumber = 0; while (addpicnumber >= Properties.Settings.Default.Dock1.Count) { addpicnumber += 1; newpic.Name = "newpic" + addpicnumber.ToString(); TextReader tr = new StreamReader(Properties.Settings.Default.Dock1.ToString()); int NumberOfLines = Properties.Settings.Default.Dock1.Count; //Make our array for each line string[] ListLines = new string[NumberOfLines]; newpic.Tag = ListLines[1] = tr.ReadLine(); newpic.Location = new Point(0, newpic.Location.Y + 90); this.Controls.Add(newpic); } //problem not adding a new picturebox } }
while
for
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)