vb格子点画的一点问题,求助求助啊求助(不知道也吼下啊,不要飘过)
Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)Dim wea(80, 80)
si = 300: sj = 300
For l = 1 To weft
For i = 1 To warp
Print X
If X < i * si + 100 And X > i * si - si + 100 And Y < l * sj + 100 And Y > l * sj - sj + 100 Then
If wea(i, l) = 1 Then wea(i, l) = 0
If wea(i, l) = 0 Then wea(i, l) = 1
End If
If wea(i, l) = 1 Then Form1.Line (i * si + 100, l * sj + 100)-Step(-si, -sj), QBColor(1), BF
Print X
Next i
Next l
代码显示的是上面,想通过获取鼠标点击的坐标值再通过条件判断,画格子的,但是点的时候没有变化。完全菜的连哪里不对都不知道,求大神拯救。
[ 本帖最后由 zhengzhong13 于 2012-1-4 16:04 编辑 ]