by Colin Kemege (2 Submissions)
Category: Graphics
Compatability: Visual Basic 4.0 (32-bit)
Difficulty: Unknown Difficulty
Originally Published: Tue 10th July 2001
Date Added: Mon 8th February 2021
Rating:
(1 Votes)
Tired of nasty Progressbars that you wished looked better and had more options? Just use this snippet to transform a simple Shape into your
API Declarations
'By Colin Kemege [email protected]
'Add a Form, name your form: frmProgress
'Make a shape: Shape1
'Make a Timer: Timer1
Dim p As Integer
frmprogress.Width = 7000
Timer1.Interval = 50 'you can change this to manipulate how fast/slow the shape goes
Shape1.BorderColor = vbWhite 'change this to whatever color you want
Shape1.Width = 0 'customize this if you change the timer code
Shape1.FillStyle = 0 'so vblack shows up
Shape1.FillColor = vbBlack 'change this to whatever color you want
End Sub
Private Sub Timer1_Timer()
'this timer is the key to when our shape moves and how much
Randomize
p = Int((5 - 2 + 1) * Rnd + 2) 'it moves randomly now(to an extent), but you can customize it
If p = 2 Or p = 3 Then
Shape1.Width = Shape1.Width + 65 'customize by changing the "shape.width + x", the Rnd numbers, and by changing how far the shape goes until an event occurs
End If
If p = 4 Or p = 5 Then
Shape1.Width = Shape1.Width + 22
End If
If Shape1.Width >= 4335 Then 'right now it ends the program and displays a msgbox
MsgBox "Data has been loaded" 'change this event to your likings
Unload Me
End
End If
End Sub
No comments have been posted about Tired of nasty Progressbars that you wished looked better and had more options? Just use this snipp. Why not be the first to post a comment about Tired of nasty Progressbars that you wished looked better and had more options? Just use this snipp.