by Anonymous (267 Submissions)
Category: Graphics
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Sat 15th June 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Netscape-like progress bar
Set X1 = Controls.Add("VB.Shape", "X1")
Set X2 = Controls.Add("VB.Shape", "X2")
Set X3 = Controls.Add("VB.Timer", "X3")
X1.Visible = True
X2.Visible = True
X2.Shape = vbShapeSquare
X1.Shape = vbShapeSquare
X1.Width = X1.Height
X2.Width = X2.Height
X2.Left = 100
X1.BorderColor = vbYellow
X2.BorderColor = vbRed
X3.Interval = 10
X4 = X2.Height
End Sub
Sub X3_Timer()
If X1.Tag = "" Then X1.Left = X1.Left + 100 Else X1.Left = X1.Left - 100
If X2.Tag = "" Then X2.Left = X2.Left + 100 Else X2.Left = X2.Left - 100
If X1.Left >= (Me.Width - X1.Width) Then X1.Tag = " "
If X1.Left <= 0 Then X1.Tag = ""
If X2.Left >= (Me.Width - X1.Width) Then X2.Tag = " "
If X2.Left <= 0 Then X2.Tag = ""
End Sub