希望知情人解答 非常感谢!
解决方案 »
- Error creating form: Ancestor for 'XXX' not found 问题
- 激活PageControl特定的页
- 靠,BORLAND公司怎么知道我用盗版DELPHI7的。各位用盗版的DELPHI7可要注意了。
- 我编译的可执行文件.exe问什么在别的机器上要提示差.dll运行库文件?
- 请问。NET2003 装第一张出现文件读不出怎么办?
- 关于Delphi6和flash MX传送/接收数据的问题。
- 100分求解关于paradox数据类型的问题
- 要是哪里有Delphi控件手册电子版就好了
- 请问如何杀死一个进程?
- 错误类EComponentError和错误类EAccessViolation的弹出,麻烦各位大神看下我的问题
- 如何不让子窗口自动打开?
- Method's type signature is not PInvoke compatible
2:用GetDC(0)得到桌面设备句柄,然后用BitBlt,例如:
procedure TForm4.CaptureScreen;
var
dc: HDC;
bmp: TBitmap;
begin
dc := GetDC(0);
bmp := TBitmap.Create;
try
bmp.Width := Screen.Width;
bmp.Height := Screen.Height;
bmp.PixelFormat := pf24Bit;
BitBlt(bmp.Canvas.Handle, 0, 0, bmp.Width, bmp.Height, dc, 0, 0, SRCCOPY);
bmp.SaveToFile('c:\tmep.bmp');
finally
bmp.Free;
ReleaseDC(0, dc);
end;
end;