title: Scanning an image and saving it in a specific folder
body: <p>I have created a Windows Form application to scan any image. </p>
  
  <p>After scan is complered it asks the user to save it in any folder, but I want the image to be saved in a specific folder. </p>
  
  <p>The code I have used:</p>
  
  <pre><code>public class Scanner
  {
      Device oDevice;
      Item oItem;
      CommonDialogClass dlg;
  
      public Scanner()
      {
          dlg = new CommonDialogClass();
          oDevice = dlg.ShowSelectDevice(WiaDeviceType.ScannerDeviceType, true, false);
      }
  
      public void Scann()
      {
          try
          {
              dlg.ShowAcquisitionWizard(oDevice);
          }
          catch (NullReferenceException ex)
          {
              MessageBox.Show(ex.Message);
          }
  
      }
  }
  
  private void button1_Click(object sender, EventArgs e)
  {
     Scanner oScanner = new Scanner();
     oScanner.Scann();
  
     //Saving the image to the server directly
     button1.Text = "Image scanned";
  
     OpenFileDialog dlg = new OpenFileDialog();
  
     if (dlg.ShowDialog() == DialogResult.OK)
     {
         pictureBox1.Image = Image.FromFile(dlg.FileName);
     }            
  }
  </code></pre>