將屏幕捕獲到位圖中我想在我的代碼中捕獲屏幕以獲取圖像 - 就像使用鍵盤上的“打印屏幕”按鈕一樣。有誰知道如何做到這一點(diǎn)?我沒有起點(diǎn)。
3 回答

翻閱古今
TA貢獻(xiàn)1780條經(jīng)驗(yàn) 獲得超5個(gè)贊
// Use this version to capture the full extended desktop (i.e. multiple screens)Bitmap screenshot = new Bitmap(SystemInformation.VirtualScreen.Width, SystemInformation.VirtualScreen.Height, PixelFormat.Format32bppArgb);Graphics screenGraph = Graphics.FromImage(screenshot);screenGraph.CopyFromScreen(SystemInformation.VirtualScreen.X, SystemInformation.VirtualScreen.Y, 0, 0, SystemInformation.VirtualScreen.Size, CopyPixelOperation.SourceCopy);screenshot.Save("Screenshot.png", System.Drawing.Imaging.ImageFormat.Png);
- 3 回答
- 0 關(guān)注
- 420 瀏覽
添加回答
舉報(bào)
0/150
提交
取消