我正在尝试为我的程序添加一个功能,以便在用户单击按钮时获取用户屏幕的完整屏幕截图.我得到程序截取屏幕截图并打开文件对话框保存,保存工作.问题在于,无论我如何保存屏幕截图
Private Function TakeScreenShot() As Bitmap Dim screenSize As Size = New Size(My.Computer.Screen.Bounds.Width, My.Computer.Screen.Bounds.Height) Dim screenGrab As New Bitmap(My.Computer.Screen.Bounds.Width, My.Computer.Screen.Bounds.Height) Dim g As Graphics = Graphics.FromImage(screenGrab) g.CopyFromScreen(New Point(0, 0), New Point(0, 0), screenSize) Return screenGrab End Function