| 
				 procedure TForm1.Image1MouseDown(Sender: TObject; Button: TMouseButton; 
  Shift: TShiftState; X, Y: Integer); 
begin 
  image1.Picture.LoadFromFile(fldname+'\1.bmp'); 
  c.Left:=x; 
  c.Top:=y; 
  c.Right:=292+x; 
  c.Bottom:=400+y; 
  //确定位图大小,此取值为一个标准2寸图片大小,可以根据需要来确定矩形框大小 
 Image1.Canvas.Pen.Color:=clred; 
  Image1.Canvas.DrawFocusRect(c); 
//在图像上画一个292*400的矩形框  Image1.Refresh; 
end; 
2.4  截取标准图像 
将从Image1中截取标准图像通过剪贴板存入Image2中。 
procedure TForm1.Button4Click(Sender: TObject); 
var 
  BitMap:TBitMap; 
  bakrec:TRect; 
begin 
  
    ClipBoard.Assign(Image1.Picture); //将Image1中图形存入剪贴板中 
    image2.Visible:=true; 
  
      Bakrec.Left:=0; 
  bakrec.Top:=0; 
  bakrec.Right:=292; 
  Bakrec.Bottom:=400; 
  image2.Height:=400; 
  image2.Width:=292; 
  image2.Left:=(image1.Width-image2.Width)div 2; 
image2.Top:=(image1.Height-image2.Height) div 2; 
     if ClipBoard.HasFormat(CF_BitMap) then     //剪贴板的内容可以通过查询HasFormat获得其格式位图 			
				 |