关于抓屏问题:1)执行抓屏后一会就崩溃,2)如何抓包含鼠标图标
1)第一问题的代码如下:
Dim b As Bitmap = New Bitmap(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height) Dim g As Graphics = Graphics.FromImage(b) Dim Copy_size As Size = New Size(SecScreen_Width, SecScreen_height) g.CopyFromScreen(SecScreen_x, SecScreen_y, d_x, d_y, Copy_size, CopyPixelOperation.SourceCopy) 'g.CopyFromScreen(SecScreen_x, SecScreen_y, d_x, d_y, Copy_size, CopyPixelOperation.SourceErase) PictureBox1.Image = b g.Dispose() b = Nothing g = Nothing