rt
解决方案 »
- 请问初学delphi用D7好还是XE2好?听讲XE2已经不是用object pascal了!.
- delphi 写一个下载程序,就像下载游戏前的那个下载软件,怎么样得到下载速率?
- 怎样获得正在播放的音频文件的输出波形。
- 用ole连接excel或word的问题
- 怎样设置使datetimepicker只存储日期而不存储时间,UP有分
- 如何判断本系统是WIN2000还是WIN98?
- 如何在TDBGRID中显示排列序号
- 多线程中DLL同步
- http://www.hitoday.com/SoftWare/zxiQrReport.zip 提供FOR D5的一套报表组件和一个报表编辑编辑器及源码(做个广告)
- 谁能描述一下Tstring,Tstringlist和,Tstringgrid?谢谢
- 这是个什么控件
- 怪事:for循环中循环变量值竟然大于边境值
新建BMP粘贴。
procedure TfrmMain.ScreenCap(LeftPos,TopPos,RightPos,BottomPos:integer);
var RectWidth,RectHeight:integer;
SourceDC,DestDC,Bhandle:integer;
Bitmap:TBitmap;
begin
RectWidth:=RightPos-LeftPos;
RectHeight:=BottomPos-TopPos;
SourceDC:=CreateDC('DISPLAY','','',nil);
DestDC:=CreateCompatibleDC(SourceDC);
Bhandle:=CreateCompatibleBitmap(SourceDC,RectWidth,RectHeight);
SelectObject(DestDC,Bhandle);
BitBlt(DestDC,0,0,RectWidth,RectHeight,SourceDC,LeftPos,TopPos,SRCCOPY);
Bitmap:=TBitmap.Create;
Bitmap.Handle:=BHandle;
DeleteDC(DestDC);
ReleaseDC(Bhandle,SourceDC);
BmpStream.Position:=0;
ImageMain.Picture.Bitmap.LoadFromStream(BmpStream);
...
...
BmpStream.Free;
DeleteDC(DestDC);
ReleaseDC(Bhandle,SourceDC);
end;