我有两种形式.
我需要屏幕拍摄第一张表格,而不是将其放在表格2的顶部,也不包括表格2中的内容.
以下是我正在使用的一些内容,我正在努力解决这个问题.
Private Function TakeScreenShot(ByVal Control As Control) As Bitmap
Dim Screenshot As New Bitmap(Control.Width, Control.Height)
Control.DrawToBitmap(Screenshot, New Rectangle(0, 0, Control.Width, Control.Height))
Return Screenshot
End Function
Run Code Online (Sandbox Code Playgroud)
此功能无效,因为Control.drawtoBitmap未设置IMG的值.
IMG是空白的,并以纯白图像的形式返回.
这个函数的调用就是这个
TakeScreenShot(form1.webbrowser1).Save("c:\Screenshot.png",
System.Drawing.Imaging.ImageFormat.Png)
Run Code Online (Sandbox Code Playgroud)
所有帮助将不胜感激.