Is there a way to add color to the progress bar control ? Like adding fill color and background color and shading?
Printable View
Is there a way to add color to the progress bar control ? Like adding fill color and background color and shading?
I think you can change it using API, but I would rather use one like this:
http://www.pscode.com/vb/scripts/Sho...56151&lngWId=1
If just a color change is all you want then its just a couple of lines of code plus you dont have the extra ocx to distribute with your app.
VB Code:
Private Declare Function SendMessageLong Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, _ ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long Private Const PBM_SETBARCOLOR As Long = &H409 Private Const PBM_SETBKCOLOR As Long = &H2001 'USE Call SendMessageLong(prbStatus.hwnd, PBM_SETBARCOLOR, 0&, vbRed)
I have used this Progress Bar Class (no ocx to ship with your application) from vbaccelerator. It gives you full control of the progress bar as well as extra features (like xp theme). It draws the progress bar on a picturebox.
http://www.vbaccelerator.com/home/vb...ss/article.asp
Hello Hassan, Thank you very much for your help! I am new at vb and appreciate your help. I will practice with your code. I can't believe Microsoft didn't design the progress control to be able to have fill colors and background colors on it like most of the rest of the controls. Why do you think they did that? Almost every download I see has a real nice colored progress bar to let you know it is downloading.
Thanks again. Ira Lavender ([email protected])