第1个回答 2009-11-16
就是,给点分也好有动力呀
这是一个简单示例
Option Explicit
Dim x, y As Integer
Private Sub Command1_Click()
HScroll1.Max = 1000
HScroll1.Min = 100
HScroll1.SmallChange = 50
HScroll1.LargeChange = 100
HScroll1.Value = 100
y = Picture1.Height
x = 100
Timer1.Enabled = True
End Sub
Private Sub HScroll1_Change()
Timer1.Interval = HScroll1.Value
End Sub
Private Sub Timer1_Timer()
Picture1.Cls
y = y - 100
'判断是否到顶头,若到头则返回底端
If y < 0 Then y = Picture1.Height
'定义输出位置
Picture1.PSet (x, y)
Picture1.Print "滚动字幕1"
Picture1.PSet (x + 100, y + 200)
Picture1.Print "滚动字幕2"
Picture1.PSet (x + 200, y + 400)
Picture1.Print "滚动字幕3"
End Sub本回答被提问者采纳
第2个回答 2019-07-08
private sub form_load()
with label1
.autosize = true
.caption = "字幕滚动"
.fontsize = 16
.forecolor = vbred
end with
with timer1
.enabled = true
.interval = 100
end with
with hscroll1
.min = 0
.max = me.scalewidth
end with
end sub
private sub timer1_timer()
with label1
.left = hscroll1.value
.top = .top - 100
if .top <= 0 then .top = me.scaleheight - .height
end with
end sub