VB程序设计 : 我在picture事件里面画了圆,想通过Mouse事件移动圆 怎么办 急!今天之内就要!!! 30
Dima(8)AsIntegerPrivateSubCommand1_Click()a(1)=1a(2)=1a(3)=0a(4)=2a(5)=2CalldrawEndSu...
Dim a(8) As Integer
Private Sub Command1_Click()
a(1) = 1
a(2) = 1
a(3) = 0
a(4) = 2
a(5) = 2
Call draw
End Sub
Private Sub draw()
Picture1.Cls
Picture1.BackColor = &HFFC0C0
Picture1.FillStyle = 0
For i = -3 To 3
Picture1.Line (i, -1)-(i, 1), QBColor(0)
Picture1.Line (-3, i)-(3, i), QBColor(0)
Next i
For i = -3 To 3
If a(i + 3) = 1 Then
Picture1.FillColor = QBColor(5)
Picture1.Circle (CInt(i), CInt(0)), 0.3, QBColor(0)
End If
If a(i + 3) = 2 Then
Picture1.FillColor = QBColor(3)
Picture1.Circle (CInt(i), CInt(0)), 0.3, QBColor(0)
End If
Next
End Sub 展开
Private Sub Command1_Click()
a(1) = 1
a(2) = 1
a(3) = 0
a(4) = 2
a(5) = 2
Call draw
End Sub
Private Sub draw()
Picture1.Cls
Picture1.BackColor = &HFFC0C0
Picture1.FillStyle = 0
For i = -3 To 3
Picture1.Line (i, -1)-(i, 1), QBColor(0)
Picture1.Line (-3, i)-(3, i), QBColor(0)
Next i
For i = -3 To 3
If a(i + 3) = 1 Then
Picture1.FillColor = QBColor(5)
Picture1.Circle (CInt(i), CInt(0)), 0.3, QBColor(0)
End If
If a(i + 3) = 2 Then
Picture1.FillColor = QBColor(3)
Picture1.Circle (CInt(i), CInt(0)), 0.3, QBColor(0)
End If
Next
End Sub 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询