www.pudn.com > SuperDLL2.zip > frmPBarColor.frm
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form frmPBarColor
BorderStyle = 1 'Fixed Single
Caption = "Custom Color ProgressBar"
ClientHeight = 2196
ClientLeft = 48
ClientTop = 336
ClientWidth = 4860
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 2196
ScaleWidth = 4860
StartUpPosition = 2 'CenterScreen
Begin VB.Timer Timer1
Interval = 50
Left = 0
Top = 0
End
Begin MSComctlLib.ProgressBar ProgressBar2
Height = 255
Left = 360
TabIndex = 0
Top = 720
Width = 4095
_ExtentX = 7218
_ExtentY = 445
_Version = 393216
Appearance = 1
Max = 50
Scrolling = 1
End
Begin MSComctlLib.ProgressBar ProgressBar4
Height = 255
Left = 360
TabIndex = 1
Top = 1560
Width = 4095
_ExtentX = 7218
_ExtentY = 445
_Version = 393216
Appearance = 1
Max = 50
Scrolling = 1
End
Begin MSComctlLib.ProgressBar ProgressBar1
Height = 252
Left = 360
TabIndex = 2
Top = 360
Width = 4092
_ExtentX = 7218
_ExtentY = 445
_Version = 393216
Appearance = 1
Max = 50
End
Begin MSComctlLib.ProgressBar ProgressBar3
Height = 252
Left = 360
TabIndex = 3
Top = 1200
Width = 4092
_ExtentX = 7218
_ExtentY = 445
_Version = 393216
Appearance = 1
Max = 50
End
End
Attribute VB_Name = "frmPBarColor"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Form_Load()
Dim FC As Long, BC As Long
Dim FC2 As Long, BC2 As Long
FC = RGB(255, 0, 127)
BC = RGB(127, 0, 255)
FC2 = RGB(255, 204, 51)
BC2 = RGB(51, 102, 153)
PBarColor ProgressBar1.hWnd, FC, BC
PBarColor ProgressBar2.hWnd, FC, BC
PBarColor ProgressBar3.hWnd, FC2, BC2
PBarColor ProgressBar4.hWnd, FC2, BC2
End Sub
Private Sub Timer1_Timer()
Static q As Integer, w As Integer
If w = 0 Then w = 2
q = q + w
If q < ProgressBar1.Min Then
w = -w
q = ProgressBar1.Min
End If
If q > ProgressBar1.Max Then
w = -w
q = ProgressBar1.Max
End If
ProgressBar1.Value = q
ProgressBar2.Value = q
ProgressBar3.Value = q
ProgressBar4.Value = q
End Sub
Private Sub Form_Unload(Cancel As Integer)
frmMenu.Show
End Sub