Foxtable(狐表)用户栏目专家坐堂 → 如何清空数组


  共有4208人关注过本帖树形打印复制链接

主题:如何清空数组

帅哥哟,离线,有人找我吗?
有点甜
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2013/10/18 21:35:00 [显示全部帖子]

试试

Dim p As WinForm.Painter = e.Form.Controls("Painter1")
Dim g As Graphics = p.Graphics


If Vars("n") = 1 Then
    If e.Button = MouseButtons.Left Then
        points.add(New Point(e.x,e.y))
        Vars("n")=Vars("n")+ 1
    End If
ElseIf Vars("n") = 2 Then
    If e.Button = MouseButtons.Left Then
        points.add(New Point(e.x,e.y))
    End If
End If

If Vars("n") = 2 Then
    Dim point() As point = points.ToArray()
    g.DrawLine(Pens.Red,point(0).x,point(0).y ,point(1).x ,point(1).y)
    p.repaint()
    points.clear()
    Vars("n") = 1
End If


 回到顶部