Closed 800903 closed 2 months ago
thanks ,get it done;
delegate void SetProcssBarCallback(int _value); private void SetProcssBar(int _value) { if (progressBarScan.InvokeRequired) { while (progressBarScan.IsHandleCreated == false) { if (progressBarScan.Disposing || progressBarScan.IsDisposed) return; } SetProcssBarCallback d = new SetProcssBarCallback(SetProcssBar); progressBarScan.Invoke(d, new object[] { _value }); } else { progressBarScan.Value = _value; } }
//============================== var op = new ScanOperation(options); scanController.PageStart += (sender, args) => { op.NextPage(args.PageNumber); SetProcssBar(10); }; scanController.ScanEnd += (sender, args) => { op.Completed(); if (args.Error != null) { MessageBox.Show(args.Error.ToString()); } SetProcssBar(100); };
use demo from the website -->https://www.naps2.com/sdk the demo can not show the scan Progress.. vs2013 NAPS2.Threading.Invoker.Current cant not use by other application.