How to increase image size imagelist ImageList over 256; 256 256x256?

I have notes for the piano, which I load into the imagelist ImageList they become 256; 256 256x256 and it looks not very nice. Can

Is it possible to increase the size in the imagelist ImageList or where to store the images so that they would not lose their size when inserting a picterbox PictureBox?

// Display the image. private void button52_Click(Object sender, EventArgs e) { if (imageList1.Images.Empty != true) { if (imageList1.Images.Count - 1 > currentImage) { currentImage++; } else { currentImage = 0; } // Show the image in the PictureBox. pictureBox1.Image = imageList1.Images[currentImage]; listBox1.SelectedIndex = currentImage; } } // Remove the image. private void button54_Click(Object sender, EventArgs e) { imageList1.Images.RemoveAt(listBox1.SelectedIndex); listBox1.Items.Remove(listBox1.SelectedItem); } // Clear all images. private void button56_Click(Object sender, EventArgs e) { imageList1.Images.Clear(); listBox1.Items.Clear(); } // Find an image. private void button58_Click(Object sender, EventArgs e) { openFileDialog1.Multiselect = true; if (openFileDialog1.ShowDialog() == DialogResult.OK) { if (openFileDialog1.FileNames != null) { for (int i = 0; i < openFileDialog1.FileNames.Length; i++) { addImage(openFileDialog1.FileNames[i]); } } else addImage(openFileDialog1.FileName); } } private void addImage(string imageToLoad) { if (imageToLoad != "") { imageList1.Images.Add(Image.FromFile(imageToLoad)); listBox1.BeginUpdate(); listBox1.Items.Add(imageToLoad); listBox1.EndUpdate(); } } 

piano

  • Use any suitable collection. For example, List<Image> . - Alexander Petrov
  • @Alexander Petrov can give an example please - Valentin

0