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;
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;