能不能帮我做道VB的题目啊,简单编程的,明天要考试了,这个事例题不会做,帮忙啊
就是打开程序出现个圆,红色的,然后点击窗体圆变成黄色的,再点下变成绿色的,然后循环颜色最好能有代码,或者简单提示下,我也能做出来...
就是打开程序出现个圆,红色的,然后点击窗体圆变成黄色的,再点下变成绿色的,然后循环颜色
最好能有代码,或者简单提示下,我也能做出来 展开
最好能有代码,或者简单提示下,我也能做出来 展开
2010-06-08
展开全部
Dim i As Integer
Private Sub Form_Click()
i = i Mod 3
Select Case i
Case 0
Me.Cls
Me.FillColor = vbRed
Me.Circle (10, 10), 2, vbRed
Case 1
Me.Cls
Me.FillColor = vbYellow
Me.Circle (10, 10), 2, vbYellow
Case 2
Me.Cls
Me.FillColor = vbGreen
Me.Circle (10, 10), 2, vbGreen
End Select
i = i + 1
End Sub
Private Sub Form_Load()
i = 0
Scale (0, 0)-(20, 20)
Me.FillStyle = 0
End Sub
Private Sub Form_Click()
i = i Mod 3
Select Case i
Case 0
Me.Cls
Me.FillColor = vbRed
Me.Circle (10, 10), 2, vbRed
Case 1
Me.Cls
Me.FillColor = vbYellow
Me.Circle (10, 10), 2, vbYellow
Case 2
Me.Cls
Me.FillColor = vbGreen
Me.Circle (10, 10), 2, vbGreen
End Select
i = i + 1
End Sub
Private Sub Form_Load()
i = 0
Scale (0, 0)-(20, 20)
Me.FillStyle = 0
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询