非常同意火凤凰,鼠标是后画上去的
给你一段我的代码吧,C++Builder的,应该能看懂
void __fastcall TfrmMainForm::CaptureScreen()
{
Graphics::TBitmap* FullScreen = new Graphics::TBitmap;
TCanvas* FullScreenCanvas = new TCanvas;
HDC DC;
FullScreen->Width = Screen->Width;
FullScreen->Height = Screen->Height;
DC = GetDC(0);
FullScreenCanvas->Handle = DC;
FullScreen->Canvas->CopyRect(Rect(0,0,Screen->Width,Screen->Height), FullScreenCanvas,
Rect(0,0,Screen->Width,Screen->Height));
delete FullScreenCanvas;
ReleaseDC(0, DC);
imgScreen->Width = FullScreen->Width;
imgScreen->Height = FullScreen->Height;
imgScreen->Picture->Bitmap = FullScreen;
delete FullScreen;
Application->Restore();
}