Oh, and I also did a test like this:
vb.net Code:
  1. Public Class Form1
  2.     Protected Overrides Sub OnPaint(ByVal e As System.Windows.Forms.PaintEventArgs)
  3.         Dim g As Graphics = e.Graphics
  4.         Dim img As Bitmap = My.Resources.test.Clone()
  5.         LockBitsTest(img)
  6.         g.DrawImage(img, 10, 10)
  7.         MyBase.OnPaint(e)
  8.     End Sub
  9.     Private Sub LockBitsTest(ByVal img As Bitmap)
  10.         Dim b_data As Drawing.Imaging.BitmapData = img.LockBits(New Rectangle(0, 0, img.Width, img.Height), Imaging.ImageLockMode.ReadWrite, Imaging.PixelFormat.Format32bppArgb)
  11.         Dim ptr As IntPtr = b_data.Scan0
  12.         Dim bytes As Integer = b_data.Stride * b_data.Height
  13.         Dim img_bytes(bytes - 1) As Byte
  14.         System.Runtime.InteropServices.Marshal.Copy(ptr, img_bytes, 0, bytes)
  15.         Dim y, x As Integer
  16.         For y = 1 To img.Height - 2
  17.             For x = 1 To img.Width - 2
  18.                 Try
  19.                     img_bytes((y * img.Width + x) * 4) = 255
  20.                     img_bytes((y * img.Width + x) * 4 + 1) = 255
  21.                     'img_bytes((y * img.Width + x) * 4 + 2) = n_px.G
  22.                     'img_bytes((y * img.Width + x) * 4 + 3) = n_px.B
  23.                 Catch ex As Exception
  24.                     GoTo finish_sub
  25.                 End Try
  26.             Next
  27.         Next
  28. finish_sub:
  29.         img.UnlockBits(b_data)
  30.     End Sub
  31. End Class
It gave me no errors, but the image didn't change.

What's wrong?