本文整理自网络,侵删。
需要一段实现的功能的代码
procedure TForm1.Button1Click(Sender: TObject); var SrcBmp, DestBmp: TBitmap; begin SrcBmp := TBitmap.Create; SrcBmp.LoadFromFile('C:\Source.bmp'); DestBmp := TBitmap.Create; DestBmp.Width := 100; DestBmp.Height := 100; DestBmp.Canvas.CopyRect(Rect(0, 0, 100, 100), SrcBmp.Canvas, Rect(50, 50, 150, 150)); DestBmp.SaveToFile('C:\Dest.bmp'); SrcBmp.Free; DestBmp.Free; end;
相关阅读 >>
Delphi代码,直截注入别的进程,之后直截运行在别的进程中的代码
更多相关阅读请进入《Delphi》频道 >>