5.用vb编程:设计一个流动的字幕程序(使用计时器控件)
Private Sub Check1_Click()
If Check1.Value = 1 Then
Label1.FontName = "隶书"
Else
Label1.FontName = "宋体"
End If
End Sub
Private Sub Check2_Click()
If Check2.Value = 1 Then
Label1.FontBold = True
Else
Label1.FontBold = False
End If
End Sub
Private Sub Check3_Click()
If Check3.Value = 1 Then
Label1.FontSize = 65
Else
Label1.FontSize = 25
End If
End Sub
Private Sub Form_Load()
Check1.Value = 0
Check2.Value = 0
Check3.Value = 0
Option3.Value = True
Timer1.Interval = 50
End Sub
Private Sub Option1_Click()
Timer1.Enabled = True
End Sub
Private Sub Option2_Click()
Timer1.Enabled = False
End Sub
Private Sub Option3_Click()
Label1.ForeColor = vbRed
End Sub
Private Sub Option4_Click()
Label1.ForeColor = vbBlue
End Sub
Private Sub Timer1_Timer()
If Label1.Left + Label1.Width > 0 Then
Label1.Move Label1.Left - 30
Else
Label1.Left = Form1.ScaleWidth
End If
End Sub
Private Sub VScroll1_Change()
Timer1.Interval = VScroll1.Value
End Sub
在流动字幕的基础上增加了一些东东
2024-09-19 广告