title: How to show thumbnail of pdf in listview C#.net?
body: <pre><code>ImageList imageList = new ImageList();
                  if (folder != null &amp;&amp; System.IO.Directory.Exists(folder))
                  {
                      try
                      {
                          string[] arrImageName=new string[1000];
                          int Count = 0;
                          string CutName;
                          DirectoryInfo dir = new DirectoryInfo(@folder);
                          foreach (FileInfo file in dir.GetFiles())
                          {
                              try
                              {
  
                                  imageList.ImageSize = new Size(140, 140);
                                  imageList.ColorDepth = ColorDepth.Depth32Bit;
                                  Image img1 = Image.FromFile(file.FullName);
                                  CutName = file.FullName;
                                  CutName = CutName.Replace(folder, "");
                                  CutName = CutName.Replace("\\", "");
                                  arrImageName[Count] = CutName;
                                  imageList.Images.Add(FormatImage(imageList.ImageSize.Width, img1));                              
                                  Count = Count + 1;
                              }
                              catch
                              {
                                  Console.WriteLine("This is not an image file");
                              }     
                          }
  
  
                          for (int j = 0; j &lt; imageList.Images.Count; j++)
                          {
                              this.ListView1.Items.Add((j + 1) + "/" + imageList.Images.Count + " " + "\r\n" + arrImageName[j]);                                
                              this.ListView1.Items[j].ImageIndex = j;
                          }
  
                          this.ListView1.View = View.LargeIcon;
                          this.ListView1.LargeImageList = imageList;
                          //import(folder);
                      }
                      catch (Exception ex)
                      {
  
                      }
                  } 
  </code></pre>