当前位置:主页>delphi盒子/delphi园地/编程技巧> 文章内容

使用过ACCESS的高手帮个忙看是什么问题

发布时间:2010-01-20 | QQ免费站
1楼: 用区域抓图copyrect

2楼: 我想抓取当前运行程序的图像,比如说窗体上有一panel,panel上有两个image图形 抓的图像是panel区域内的图像 字串5

3楼: 给个demo,你自己改一下 procedure TForm1.Button5Click(Sender: TObject); var bmp:tbitmap; begin bmp:=tbitmap.Create; bmp.Height:=form1.Height; bmp.Width:=form1.Width; image1.Height:=panel1.Height; image1.Width:=panel1.Width; bmp.Canvas.CopyRect(rect(panel1.Left,panel1.Top,panel1.Width,panel1.Height),form1.Canvas,rect(panel1.Left,panel1.Top,form1.panel1.Width,panel1.Height)); image1.Picture.Bitmap:=bmp; image1.Repaint; bmp.Free; end; 字串5

4楼: funxu: 你这个办法有缺陷,每次抓图后,图的位置改变了,造成原图像越来越小,就好像缩进一样 字串5

5楼: where Nobody????? 字串3

6楼: prop

字串1

7楼: prop

字串9

8楼: 注意看这句,rect的范围是自己定义的 bmp.Canvas.CopyRect(rect(panel1.Left,panel1.Top,panel1.Width,panel1.Height),form1.Canvas,rect(panel1.Left,panel1.Top,form1.panel1.Width,panel1.Height)); 字串8

9楼: 我通过别的方法解决的,funxu你的方法还是有缺陷,不过谢谢你, 我的方法是: 抓panel的图片写道bmp里,保存到文件中,image在从文件里读出来,就不会出现图片变小拉
字串1