[原创][蜘蛛网程序]供初学者看看
*/ --------------------------------------------------------------------------------------*/ 出自: 编程中国 http://www.bc-cn.net
*/ 作者: 三断笛
*/ 时间: 2007-10-19 编程论坛首发
*/ 声明: 尊重作者劳动,转载请保留本段文字
*/ --------------------------------------------------------------------------------------
源代码:
Private Sub Form_Load()
Me.ScaleWidth = Screen.Width
Me.ScaleHeight = Screen.Height
Me.ScaleMode = 3
Me.ScaleTop = 0
Me.ScaleLeft = 0
Me.BorderStyle = 0
Me.Scale (0, 0)-(Me.Width, Me.Height)
Me.WindowState = 2
Me.BackColor = RGB(0, 0, 0)
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Static LastX As Double
Static LastY As Double
If Button = 2 Then End
Line (0, 0)-(LastX, LastY), Me.BackColor
Line (0, Me.ScaleHeight)-(LastX, LastY), Me.BackColor
Line (Me.ScaleWidth, 0)-(LastX, LastY), Me.BackColor
Line (Me.ScaleWidth, Me.ScaleHeight)-(LastX, LastY), Me.BackColor
Line (Me.ScaleWidth / 2, 0)-(LastX, LastY), Me.BackColor
Line (Me.ScaleWidth / 2, Me.ScaleHeight)-(LastX, LastY), Me.BackColor
Line (0, Me.ScaleHeight / 2)-(LastX, LastY), Me.BackColor
Line (Me.ScaleWidth, Me.ScaleHeight / 2)-(LastX, LastY), Me.BackColor
Line (0, 0)-(X, Y)
Line (0, Me.ScaleHeight)-(X, Y), RGB(255, 0, 0)
Line (Me.ScaleWidth, 0)-(X, Y), RGB(0, 255, 0)
Line (Me.ScaleWidth, Me.ScaleHeight)-(X, Y), RGB(0, 0, 255)
Line (Me.ScaleWidth / 2, 0)-(X, Y), RGB(255, 255, 0)
Line (Me.ScaleWidth / 2, Me.ScaleHeight)-(X, Y), RGB(255, 0, 255)
Line (0, Me.ScaleHeight / 2)-(X, Y), RGB(0, 255, 255)
Line (Me.ScaleWidth, Me.ScaleHeight / 2)-(X, Y), RGB(255, 255, 255)
LastX = X
LastY = Y
End Sub
[此贴子已经被作者于2007-10-19 17:17:22编辑过]