把整个窗体保存为图片的方法 - 回复 "乌龙哈里" 的问题
作者:互联网
把整个窗体保存为图片的方法 - 回复 "乌龙哈里" 的问题
问题来源: http://www.cnblogs.com/del/archive/2008/06/27/1197961.html#1237665unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TForm1 = class(TForm) Button1: TButton; procedure Button1Click(Sender: TObject); end; var Form1: TForm1; implementation {$R *.dfm} procedure TForm1.Button1Click(Sender: TObject); var bit: TBitmap; begin bit := TBitmap.Create; bit.Width := Width; bit.Height := Height; BitBlt(bit.Canvas.Handle, 0, 0, Width, Height, GetWindowDC(Handle), 0, 0, SRCCOPY); bit.SaveToFile('c:\temp\Form1.bmp'); bit.Free; end; end.posted on 2008-06-27 10:13 万一 阅读(4318) 评论(2) 编辑 收藏
标签:end,TBitmap,TForm1,Height,Width,窗体,哈里,bit,乌龙 来源: https://blog.51cto.com/u_14617575/2747807