¡ Hola que tal!
Espero que puedan ayudar, la verdad es que ando medio chavo en esto aun de programación
Tengo un "listview" en el cual quisiera visualizar todas las paginas que contiene un archivo .tiff (multipagina), lo malo es que solo visualizo solo la primera pagina, esto lo hago con ayuda de un "imagelist"
les dejo aquí el código haber si alguien me pudiera apoyar
quedare muy agradecido
listView1.Clear();
imageList1.Images.Clear();
dataGridView1.Rows[e.RowIndex].Selected = true;
string fil = dataGridView1.Rows[e.RowIndex].Cells[0].Value.ToString();
string nombre = dataGridView1.Rows[e.RowIndex].Cells[1].Value.ToString();
nombre = nombre + ".tif";
DateTime fecha = new DateTime();
fecha = dateTimePicker1.Value;
string Fecha = "";
Fecha = Convert.ToString(fecha);
Fecha = Fecha.Substring(0, 2) + Fecha.Substring(2, 2) + Fecha.Substring(4, 7);
Fecha = Fecha.Replace("/", "");
DirectoryInfo directory = new DirectoryInfo(CLSVars.RutaImagenes + @"" + Fecha + @"");
DirectoryInfo direc = new DirectoryInfo(CLSVars.RutaImagenes + @"" + Fecha);
FileInfo[] files = directory.GetFiles("*.tif");
if (files.Length > 0)
{
for (int i = 0; i < files.Length; i++)
{
int num = files.Length;
string fileName1 = files[i].Name;
if (fileName1 == nombre)
{
System.Drawing.Image myImage = Image.FromFile (directory+fileName1);
try
{
this.imageList1.Images.Add(myImage);
}
catch
{
Console.WriteLine("No es un archivo de imagen");
}
this.listView1.View = View.LargeIcon;
this.imageList1.ImageSize = new Size(256, 256);
this.listView1.LargeImageList = this.imageList1;
for (int j = 0; j < this.imageList1.Images.Count; j++)
{
ListViewItem item = new ListViewItem();
item.ImageIndex = j;
this.listView1.Items.Add(item);
}
}
}
}