Thema: Delphi Delphi Twain

Einzelnen Beitrag anzeigen

ngott2

Registriert seit: 26. Aug 2013
81 Beiträge
 
Delphi 10 Seattle Professional
 
#7

AW: Delphi Twain

  Alt 12. Feb 2014, 16:12
So gehe ich vor

ftwain gibt es auf jeden Fall schon.

Code:
  FreeAndNil(ftwain);
  fTwain :=TDelphiTwain.Create(nil);
  try
    if fTwain.LoadLibrary then
    begin
      fTwain.SourceManagerLoaded := True;
      {Allow user to select source}
      SelectedSource := fTwain.SelectSource;
      ShowMessage(IntToStr (fTwain.SourceCount));
      if (SelectedSource <> -1) then
      begin
        {Load source, select transference method and enable display interface}
        fTwain.Source[SelectedSource].Loaded := True;
        {Show scanconfig!}
        fTwain.Source[SelectedSource].ShowUI := False;
        fTwain.Source[SelectedSource].Enabled := True;
      end
      else
      begin
        ShowMessage('Twain is not installed.');
      end;
    end;
  except
    ShowMessage('Twain is not installed.');
  end;
  Mit Zitat antworten Zitat