picture is used by another process (layoutpanel)
问题 So i am filling a float layout panel with images, with this code: private void FillPanel(string sql) { panel.Controls.Clear(); SQLiteConnection dbConnect = new SQLiteConnection("Data Source=" + dbFullPath + ";Version=3;"); dbConnect.Open(); SQLiteCommand runQuery = new SQLiteCommand(sql, dbConnect); SQLiteDataReader reader = runQuery.ExecuteReader(); while (reader.Read()) { PictureBox pB = new PictureBox(); pB.Image = Image.FromFile(reader["imgPath"].ToString()); pB.Size = new Size(100, 100);