怎样写一个程序给当前的屏幕一个COPY,相当于按下Print Screen SysRq键,并把屏幕的COPY保存起来. 用winAPI,有个函数是取屏的,函数名不记得了,查一下资料 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 你可以把击键PrintScreen发送到应用程序:System.Windows.Forms.SendKeys.Send("{PRTSC}"); http://www.5xsoft.com/data/200203/2914353201.htm http://www.codeproject.com/csharp/csCaptureScreen1.asp?target=screen现成代码,不过自己要分析一下 void __fastcall TForm1::Net_Snap_Screen(int LeftPos,int TopPos, int RightPos,int BottomPos){int RectWidth,RectHeight; HDC SourceDC;Graphics::TBitmap *Bitmap=new Graphics::TBitmap(); RectWidth=RightPos-LeftPos; RectHeight=BottomPos-TopPos; SourceDC=CreateDC("Display",NULL,NULL,NULL); Bitmap->Width = RectWidth;Bitmap->Height= RectHeight;BitBlt(Bitmap->Canvas->Handle,0,0,RectWidth,RectHeight,SourceDC,LeftPos,TopPos,SRCCOPY);TJPEGImage*jpeg=new TJPEGImage();jpeg->PixelFormat=jf8Bit;jpeg->CompressionQuality=JPEGQuality;jpeg->Assign((TPersistent*)Bitmap);jpeg->Compress();JPEGStream->Clear();jpeg->SaveToStream(JPEGStream); delete jpeg; delete Bitmap;DeleteDC(SourceDC); 菜鸟求指点 c sharp 请教如何覆盖添加txt文件内容。 C#中怎么将目录下的几个文件移动到另一个目录 如何关闭一个新启动的进程?谢谢。 在属性面板中如何快速定位属性 关于用Installshiled打包时,加载合并模块的问题,谢谢! 代码! 【诡异】【50分】居然不会产生乱码! 数据库权限 请问struct同class的异同? 请问:在C#中取模怎么取?
你可以把击键PrintScreen发送到应用程序:
System.Windows.Forms.SendKeys.Send("{PRTSC}");
现成代码,不过自己要分析一下
int RightPos,int BottomPos)
{
int RectWidth,RectHeight;
HDC SourceDC;
Graphics::TBitmap *Bitmap=new Graphics::TBitmap();
RectWidth=RightPos-LeftPos;
RectHeight=BottomPos-TopPos;
SourceDC=CreateDC("Display",NULL,NULL,NULL);
Bitmap->Width = RectWidth;
Bitmap->Height= RectHeight;
BitBlt(Bitmap->Canvas->Handle,0,0,RectWidth,RectHeight,SourceDC,LeftPos,TopPos,SRCCOPY);
TJPEGImage*jpeg=new TJPEGImage();
jpeg->PixelFormat=jf8Bit;
jpeg->CompressionQuality=JPEGQuality;
jpeg->Assign((TPersistent*)Bitmap);
jpeg->Compress();
JPEGStream->Clear();
jpeg->SaveToStream(JPEGStream); delete jpeg;
delete Bitmap;
DeleteDC(SourceDC);