Guest User

Untitled

a guest
Nov 17th, 2017
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. private void btnZoom_Click(object sender, EventArgs e)
  2. {
  3. ImageList imgs = new ImageList();
  4. imgs.ImageSize = new Size(100, 100);
  5.  
  6. string[] paths = { };
  7. paths = Directory.GetFiles("TestFolder");
  8.  
  9. try
  10. {
  11. foreach (string path in paths)
  12. {
  13. imgs.Images.Add(Image.FromFile(path));
  14. }
  15. }
  16. catch (Exception ex)
  17. {
  18. MessageBox.Show(ex.Message);
  19. }
  20. listView1.SmallImageList = imgs;
  21. listView1.Items.Add("2",0);
  22. }
Add Comment
Please, Sign In to add comment