我正在使用Delphi7中的DelphiTwain组件进行扫描。问题是,如果扫描仪是多功能的(即有平板和进纸器),平板和进纸器加载页面。现在,当我尝试从平板扫描时,它会自动从进纸器扫描。我的扫描码是,
If cmbScanningMode.Text = 'Doc Feeder' Then
Begin
DelphiTwain1.Source[twainSource].GetFeederEnabled(flgLoaded);
If flgLoaded Then
Begin`enter code here`
DelphiTwain1.Source[twainSource].SetFeederEnabled(True);
DelphiTwain1.Source[twainSource].SetAutoFeed(True);
End
Else //If not flgLoaded then
Begin
ShowMessage('Please insert document in feeder');
DelphiTwain1.UnloadLibrary;
scanState := 'NoPage';
Break;
End
Else If cmbScanningMode.Text = 'Flatbed' Then
Begin
DelphiTwain1.Source[twainSource].SetFeederEnabled(False);
DelphiTwain1.Source[twainSource].SetAutoFeed(False);
End;