用winAPI,有个函数是取屏的,函数名不记得了,查一下资料

解决方案 »

  1.   


    你可以把击键PrintScreen发送到应用程序:
    System.Windows.Forms.SendKeys.Send("{PRTSC}"); 
      

  2.   

    http://www.5xsoft.com/data/200203/2914353201.htm
      

  3.   

    http://www.codeproject.com/csharp/csCaptureScreen1.asp?target=screen
    现成代码,不过自己要分析一下
      

  4.   

    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);