VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Change Backcolour and Fill Colour In Progress Bar

by Gehan Fernando (47 Submissions)
Category: Custom Controls/Forms/Menus
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Mon 14th August 2006
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Change Backcolour and Fill Colour In Progress Bar

API Declarations



Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" _
(ByVal hwnd As Long, ByVal wMsg As Long, _
ByVal wParam As Integer, ByVal lParam As Any) As Long

Private Const PBM_SETBARCOLOR As Long = (WM_USER + 9)
Private Const CCM_SETBKCOLOR As Long = (CCM_FIRST + 1)
Private Const PBM_SETBKCOLOR As Long = CCM_SETBKCOLOR

Private Enum PrScrolling
Standard = 0
Smoth = 1
End Enum

Private Enum PrBarColor
DRed = vbRed
DGreen = vbGreen
DBlue = vbBlue
DBCustom = &HE76F0C
End Enum

Private Enum PrAppearance
ccFlat = 0
cc3D = 1
End Enum

Rate Change Backcolour and Fill Colour In Progress Bar



    
    With PB
        .Appearance = Appr
        .Scrolling = DScrolling
    End With
    SendMessage PB.hwnd, PBM_SETBARCOLOR, 0, BarColor
    SendMessage PB.hwnd, PBM_SETBKCOLOR, 0, &HFFFFFF
    
End Sub

Download this snippet    Add to My Saved Code

Change Backcolour and Fill Colour In Progress Bar Comments

No comments have been posted about Change Backcolour and Fill Colour In Progress Bar. Why not be the first to post a comment about Change Backcolour and Fill Colour In Progress Bar.

Post your comment

Subject:
Message:
0/1000 characters