的图像所以我有这样的代码:保存一个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