我想不出解决办法。这是我的代码:
Dim wbRect As Rectangle = WebBrowser1.ClientRectangle
Dim wbBm As New Bitmap(WebBrowser1.ClientRectangle.Width, WebBrowser1.ClientRectangle.Height)
Dim gwb As Graphics = Graphics.FromImage(wbBm)
gwb.CopyFromScreen(WebBrowser1.PointToScreen(New Point(14, 31)),
New Point(0, 0),
New Size(PictureBox1.Width, PictureBox1.Height))
wbBm.Save("c:\temp1.bmp")
PictureBox1.ImageLocation = "c:\temp1.bmp"
PictureBox1.BringToFront()
Dim bm As New Bitmap("c:\img1.bmp") //here appears an error - Parameter is not valid
Dim rect As New Rectangle(0, 0, bm.Width, bm.Height)
Dim bmpData As System.Drawing.Imaging.BitmapData = bm.LockBits(rect, _
System.Drawing.Imaging.ImageLockMode.ReadWrite, PixelFormat.Format24bppRgb)
我能做些什么来消除错误?