delphi截游戏画面图
procedure TForm1.Button1Click(Sender: TObject);var hwd:HWND; bmp:TBitmap; wnd:cardinal; rec:TRect;begin wnd:=FindWindow(nil,'游戏名称'); GetWindowRect(wnd,rec); bmp:=TBitmap.Create; bmp.Width:=rec.Right-rec.Left; bmp.Height:=rec.Bottom-rec.Top; bmp.PixelFormat := pf24bit; PrintWindow(wnd, bmp.Canvas.Handle, 0); Image1.Picture.Bitmap:=bmp; bmp.Free; //句柄 if hwd>0 then begin end;end;