展开全部
用timer控件每个1秒重画图像框中线条,参考程序
Dim k As Long
Private Sub Form_Load()
Picture1.AutoRedraw = True
Picture1.BackColor = vbBlack
Picture1.ForeColor = vbGreen
Timer1.Interval = 1000
Timer1.Enabled = True
Picture1.Scale (0, 100)-(100, 0)
End Sub
Private Sub Timer1_Timer()
Picture1.Cls
Picture1.Line (0, 25)-(100, 25)
Picture1.Line (0, 50)-(100, 50)
Picture1.Line (0, 75)-(100, 75)
For i = 1 To 10
Picture1.Line (i * 10 - k, 0)-(i * 10 - k, 100)
Next i
k = k + 1
If k > 9 Then k = 0
End Sub
Dim k As Long
Private Sub Form_Load()
Picture1.AutoRedraw = True
Picture1.BackColor = vbBlack
Picture1.ForeColor = vbGreen
Timer1.Interval = 1000
Timer1.Enabled = True
Picture1.Scale (0, 100)-(100, 0)
End Sub
Private Sub Timer1_Timer()
Picture1.Cls
Picture1.Line (0, 25)-(100, 25)
Picture1.Line (0, 50)-(100, 50)
Picture1.Line (0, 75)-(100, 75)
For i = 1 To 10
Picture1.Line (i * 10 - k, 0)-(i * 10 - k, 100)
Next i
k = k + 1
If k > 9 Then k = 0
End Sub
力控科技
2024-08-19 广告
2024-08-19 广告
ForceSCADA是力控科技信创产品的重要组成部分,具备完全自主知识产权,支持部署在Linux桌面版、服务器版、嵌入式等系统架构下。使用ForceSCADA可以搭建创新性高、扩展性佳、融合度强的SCADA平台,进而构建高效、智能化的监控中...
点击进入详情页
本回答由力控科技提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询