就象WINDOWS的画图一样。谢谢!急。

解决方案 »

  1.   

    procedure TMainForm.mmiPasteClick(Sender: TObject);
    begin
      { Clear the bounding rectangle }  pbPasteBox.Enabled := True;
      if DrawType = dtClipRect then
      begin
        DrawToImage(MouseOrg, NextPoint, pmNotXOR);
        EraseClipRect := False;
      end;  PasteBitmap.Assign(ClipBoard);   // Grab the data from the clipboard
      Pasted := True;
      // Set position of pasted image to top left
      pbPasteBox.Left := 0;
      pbPasteBox.Top := 0;
      // Set the size of pbPasteBox to match the size of PasteBitmap
      pbPasteBox.Width := PasteBitmap.Width;
      pbPasteBox.Height := PasteBitmap.Height;  pbPasteBox.Visible := True;
      pbPasteBox.Invalidate;           
    end;
    procedure TMainForm.mmiPasteClick(Sender: TObject);
    begin
      { Clear the bounding rectangle }  pbPasteBox.Enabled := True;
      if DrawType = dtClipRect then
      begin
        DrawToImage(MouseOrg, NextPoint, pmNotXOR);
        EraseClipRect := False;
      end;  PasteBitmap.Assign(ClipBoard);   // Grab the data from the clipboard
      Pasted := True;
      // Set position of pasted image to top left
      pbPasteBox.Left := 0;
      pbPasteBox.Top := 0;
      // Set the size of pbPasteBox to match the size of PasteBitmap
      pbPasteBox.Width := PasteBitmap.Width;
      pbPasteBox.Height := PasteBitmap.Height;  pbPasteBox.Visible := True;
      pbPasteBox.Invalidate;           
    end;