流水灯vb程序,用滚动条控制灯光变化速度
展开全部
很简单,我来给你做啊
联系我,baidu hi
控件:一组共15个Command1控件数组(Style设置为1), Label1, HScroll1, Timer1
代码:
Dim i As Integer, j As Integer
Private Sub Form_Load()
With HScroll1
.Max = 1000
.LargeChange = 200
.SmallChange = 50
.Value = 500
End With
Label1.Caption = HScroll1.Value
Timer1.Interval = HScroll1.Value
For j = 0 To 14
Command1(j).BackColor = vbGreen
Next
End Sub
Private Sub HScroll1_Change()
If HScroll1.Value = 0 Then HScroll1.Value = 50
Timer1.Interval = HScroll1.Value
Label1.Caption = HScroll1.Value
End Sub
Private Sub Timer1_Timer()
On Error Resume Next
Command1(i - 1).BackColor = vbGreen
Command1(i).BackColor = vbRed
Command1(i).SetFocus
i = i + 1
If i = 15 Then i = 0: Command1(14).BackColor = vbGreen
End Sub
调试:
VB6调试通过
联系我,baidu hi
控件:一组共15个Command1控件数组(Style设置为1), Label1, HScroll1, Timer1
代码:
Dim i As Integer, j As Integer
Private Sub Form_Load()
With HScroll1
.Max = 1000
.LargeChange = 200
.SmallChange = 50
.Value = 500
End With
Label1.Caption = HScroll1.Value
Timer1.Interval = HScroll1.Value
For j = 0 To 14
Command1(j).BackColor = vbGreen
Next
End Sub
Private Sub HScroll1_Change()
If HScroll1.Value = 0 Then HScroll1.Value = 50
Timer1.Interval = HScroll1.Value
Label1.Caption = HScroll1.Value
End Sub
Private Sub Timer1_Timer()
On Error Resume Next
Command1(i - 1).BackColor = vbGreen
Command1(i).BackColor = vbRed
Command1(i).SetFocus
i = i + 1
If i = 15 Then i = 0: Command1(14).BackColor = vbGreen
End Sub
调试:
VB6调试通过
奥蕾达
2024-11-14 广告
2024-11-14 广告
如果说原理的话,液晶是起到一个开关的作用。好比水龙头控制水量,液晶控制着光的通过量。 1 A:透明的不是液晶,而是整个显示系统。液晶显示器中的液晶显示系统在未浮花第拘郢饺电邪钉矛通电时是透明的(而且是Normaly White模式的)。 2...
点击进入详情页
本回答由奥蕾达提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询