私は私のVBアプリでスクリーンショットを取るために、このコードを使用しています:保存複数のスクリーンショット
Dim bounds As Rectangle
Dim screenshot As System.Drawing.Bitmap
Dim graph As Graphics
bounds = Screen.PrimaryScreen.Bounds
screenshot = New System.Drawing.Bitmap(bounds.Width, bounds.Height, System.Drawing.Imaging.PixelFormat.Format32bppRgb)
graph = Graphics.FromImage(screenshot)
graph.CopyFromScreen(0, 0, 0, 0, bounds.Size, CopyPixelOperation.SourceCopy)
screenshot.Save("c:\Screenshot.png", Imaging.ImageFormat.Png)
End Sub
どのように同じマップ内の複数のスクリーンショットを保存することは可能でしょうか? (例:screenshot1.png、screenshot2.png、....)
もう一度ありがとうございます。
PS:モニターが2台ある場合は、「フルスクリーン」のスクリーンショットを撮る方法はありますか?
"counter"という整数を追加し、この 'screenshot.Save(" c:\ Screenshot "&counter&" .png "、Imaging.ImageFormat.Png)を試してください。'この汚れたコードの問題は、すでに試しに試して修正したり、上書きしたりしない限り、失敗するでしょう。起動時にあなたのプログラムを持って、何番の番号が取られたのか、何番の番号が取られていないのか確認してください。 – Werdna
それはあなたのために働く場合は、タイムスタンプを追加することができます –