的圖像所以我有這樣的代碼:保存一個PictureBox
Private Sub button28_Click(sender As Object, e As EventArgs) Handles button28.Click
Dim bounds As Rectangle
Dim screenshot As System.Drawing.Bitmap
Dim graph As Graphics
bounds = PicOuterBorder.Bounds
screenshot = New System.Drawing.Bitmap(bounds.Width, bounds.Height, System.Drawing.Imaging.PixelFormat.Format32bppArgb)
graph = Graphics.FromImage(screenshot)
graph.CopyFromScreen(bounds.X, bounds.Y, 0, 0, bounds.Size, CopyPixelOperation.SourceCopy)
picFinal.Image = screenshot
'this takes a screenshot
End Sub
PicOuterBorder
是我的窗體上的圖片框。 PicFinal
是另一個顯示圖片框。但是這段代碼讓我感覺這個:這基本上是一個從我的屏幕原點開始的大小爲PicOuterBorder的窗口截圖。然而,Me.Bounds
而不是PicOuterBorder.Bounds
的作品,並得到了我的形式perefect截圖。我想picFinal擁有的只是PicOuterBorder
但首先我需要適應自己,以瞭解你所說的。請澄清。 – TGamer