I am trying to use WIA for scanning, and I ran into small problems. I use the CommonDialog.ShowAcquisitionWizard method, as described on MSDN . The problem is that the object is not returned from the method. I need to know when the scan is complete, and I tried several methods (Thread) and failed. Can someone suggest a method that I should use to determine if the scan is complete and / or the dialog is closing?
My current code is:
private void DoScan()
{
WIA.CommonDialog dialog = new WIA.CommonDialog();
Device device = dialog.ShowSelectDevice(WiaDeviceType.ScannerDeviceType);
dialog.ShowAcquisitionWizard(device);
string test = "is it done?";
}
Keith source
share