久久―日本道色综合久久,亚洲欧美精品在线,狼狼色丁香久久婷婷综合五月,香蕉人人超,日本网站黄,国产在线观看不卡免费高清,无遮挡的毛片免费

2023信創(chuàng)獨(dú)角獸企業(yè)100強(qiáng)
全世界各行各業(yè)聯(lián)合起來,internet一定要實(shí)現(xiàn)!

在 Delphi 中控制掃描儀的使用

2004-02-14 eNet&Ciweek

  ---- 附源代碼。

  unit scanu;  

  interface 

  uses

  Windows, Messages, SysUtils, Classes, Graphics, Controls,

  Forms, Dialogs, Menus, ScanLib_TLB, ExtCtrls, AxCtrls,

  OleCtrls, ImgeditLib_TLB;  

  type

  Tscanf = class(Tform)

  MainMenu1: TMainMenu;

  F1: TMenuItem;

  N15: TMenuItem;

  N1: TMenuItem;

  N2: TMenuItem;

  N16: TMenuItem;

  N11: TMenuItem;

  N5: TMenuItem;

  C1: TMenuItem;

  N4: TMenuItem;

  E1: TMenuItem;

  N6: TMenuItem;

  N7: TMenuItem;

  N8: TMenuItem;

  N3: TMenuItem;

  N10: TMenuItem;

  N9: TMenuItem;

  N1801: TMenuItem;

  N901: TMenuItem;

  N902: TMenuItem;

  H1: TMenuItem;

  N12: TMenuItem;

  N13: TMenuItem;

  ImgEdit1: TImgEdit;

  Bevel1: Tbevel;

  ImgScan1: TImgScan;

  Bevel2: Tbevel;

  procedure N4Click(Sender: Tobject);

  procedure N1Click(Sender: Tobject);

  procedure N2Click(Sender: Tobject);

  procedure C1Click(Sender: Tobject);

  procedure N8Click(Sender: Tobject);

  procedure N1801Click(Sender: Tobject);

  procedure N901Click(Sender: Tobject);

  procedure N902Click(Sender: Tobject);

  procedure N6Click(Sender: Tobject);

  procedure N7Click(Sender: Tobject);

  procedure ImgEdit1SelectionRectDrawn(Sender: Tobject; Left,Top,

  Width, Height: Integer);

  procedure N11Click(Sender: Tobject);

  private

  { Private declarations }

  public

  selleft,seltop,selwidth,selheight:integer;

  { Public declarations }

  end;

  var

  scanf: Tscanf; 

  implementation

  {$R *.DFM} 

  procedure Tscanf.N4Click(Sender: Tobject);

  begin

  imgedit1.ClearDisplay;

  close;

  end;  

  procedure Tscanf.N1Click(Sender: Tobject);

  begin

  ImgScan1.ShowSelectScanner;

  end;  

  procedure Tscanf.N2Click(Sender: Tobject);

  begin

  imgedit1.zoom:=100;

  if not imgscan1.ScannerAvailable then

  imgscan1.OpenScanner;

  imgscan1.StartScan;

  imgscan1.CloseScanner;

  end;  

  procedure Tscanf.C1Click(Sender: Tobject);

  begin

  if imgedit1.ImageDisplayed then

  begin

  imgedit1.ClearDisplay;

  imgedit1.zoom:=100;

  end;

  end;  

  procedure Tscanf.N8Click(Sender: Tobject);

  begin

  if (imgedit1.IsClipboardDataAvailable and imgedit1.ImageDisplayed )

  then

  imgedit1.ClipboardPaste(selleft,seltop);

  end;  

  procedure Tscanf.N1801Click(Sender: Tobject);

  begin

  if imgedit1.ImageDisplayed then

  imgedit1.Flip;

  end;

  procedure Tscanf.N901Click(Sender: Tobject);

  begin

  if imgedit1.ImageDisplayed then

  imgedit1.RotateRight

  end; 

  procedure Tscanf.N902Click(Sender: Tobject);

  begin

  if imgedit1.ImageDisplayed then

  imgedit1.RotateLeft;

  end;  

  procedure Tscanf.N6Click(Sender: Tobject);

  begin

  imgedit1.DrawSelectionRect(selleft,seltop,selwidth,selheight);

  imgedit1.ClipboardCut(selleft,seltop,selwidth,selheight);

  end; 

  procedure Tscanf.N7Click(Sender: Tobject);

  begin

  imgedit1.DrawSelectionRect(selleft,seltop,selwidth,selheight);

  imgedit1.ClipboardCopy(selleft,seltop,selwidth,selheight);

  end; 

  procedure Tscanf.ImgEdit1SelectionRectDrawn(Sender: Tobject; Left,

  Top, Width, Height: Integer);

  begin

  if ((width=0) and (height=0))then

  begin

  n3.Enabled:=false;

  n6.Enabled:=false;

  n7.Enabled:=false;

  selleft:=left;

  seltop:=top;

  selwidth:=width;

  selheight:=height;

  end

  else begin

  n6.Enabled:=true;

  n7.Enabled:=true;

  selleft:=left;

  seltop:=top;

  selwidth:=width;

  selheight:=height;

  end;

  end;  

  procedure Tscanf.N11Click(Sender: Tobject);

  begin

  if not imgedit1.IsClipboardDataAvailable then

  if imgedit1.imagedisplayed then

  imgedit1.ClipboardCopy(0,0,imgedit1.Width,imgedit1.Height);

  end;

  end.

相關(guān)頻道: eNews

您對(duì)本文或本站有任何意見,請(qǐng)?jiān)谙路教峤唬x謝!

投稿信箱:tougao@enet16.com