【求助】帮我看看代码有没有什么问题
在的窗体放上一个PictureBox和一个按钮 要做一个“图片逆反”的效果 下面代码运行后为什么没效果Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim tuxing As System.Drawing.Bitmap
Dim color1 As System.Drawing.Color
Dim color2 As System.Drawing.Color
Dim i, j As Integer
Dim g1 As System.Drawing.Graphics
g1 = PictureBox1.CreateGraphics
tuxing = PictureBox1.Image
For i = 0 To PictureBox1.Image.Size.Width - 1
For j = 0 To PictureBox1.Image.Size.Height - 1
color1 = tuxing.GetPixel(i, j)
color2 = Color.FromArgb(255 - color1.A, 255 - color1.B, 255 - color1.G, 255 - color1.R)
tuxing.SetPixel(i, j, color1)
Next j
PictureBox1.Refresh()
Next i
End Sub