Example #1
0
 private void btnNuevo_Click(object sender, EventArgs e)
 {
     escaneado     = new List <List <System.Drawing.Image> >();
     escanerActual = "";
     flpContenedorImagenes.Controls.Clear();
     devices = WIAScanner.GetDevicesString();
 }
Example #2
0
 private void btnEscanear_Click(object sender, EventArgs e)
 {
     try
     {
         List <System.Drawing.Image> images = WIAScanner.Scan(escanerActual);
         escaneado.Add(images);
         PictureBox muestra = null;
         foreach (System.Drawing.Image image in images)
         {
             muestra                       = new PictureBox();
             muestra.Width                 = 150;
             muestra.Height                = 200;
             muestra.BackgroundImage       = image;
             muestra.BackgroundImageLayout = ImageLayout.Stretch;
             flpContenedorImagenes.Controls.Add(muestra);
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }