|
-
Nov 15th, 2006, 12:34 AM
#1
Thread Starter
New Member
progress bar color properties?
Is there a way to add color to the progress bar control ? Like adding fill color and background color and shading?
-
Nov 15th, 2006, 12:41 AM
#2
Re: progress bar color properties?
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
-
Nov 15th, 2006, 12:48 AM
#3
Re: progress bar color properties?
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)
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Nov 15th, 2006, 07:09 AM
#4
Hyperactive Member
Re: progress bar color properties?
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
-
Nov 15th, 2006, 03:49 PM
#5
Thread Starter
New Member
Re: progress bar color properties?
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])
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|