Welcome Guest [Log In] [Register]
LOM Traffic Stats
https://youtu.be/whBtH9AnKRo

Join Legends of Modding!



If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply:
[VB.Net] Change Progressbar color
Topic Started: Jan 23 2016, 04:41 PM (205 Views)
The Best
Member Avatar
Your hands are just too short to box with god

Declare function:

This should be underneath the public class Form or whatever your form was called
Code:
 
Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Integer, ByVal wMsg As Integer, ByVal wParam As Integer, ByVal lParam As Integer) As Integer


Progressbar Color: (In this case it is yellow because i used the value 3,just change the values to the color you like)
Add this code on your button click or on whichever sub the progressbar starts increasing :
Code:
 
SendMessage(ProgressBar1.Handle, 1040, 3, 0)

Color Values
Code:
 
1 = Green
2 = Red
3 = Yellow
Edited by The Best, Jan 23 2016, 04:43 PM.
- - Quote Go To Top
 
ERI619
Member Avatar
レインメーカ

Isn't it possible to do this from the properties window?
Posted Image
- - Quote Go To Top
 
The Best
Member Avatar
Your hands are just too short to box with god

ERI619
Jan 23 2016, 04:57 PM
Isn't it possible to do this from the properties window?
Nope.
- - Quote Go To Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
ZetaBoards - Free Forum Hosting
Join the millions that use us for their forum communities. Create your own forum today.
« Previous Topic · Tutorials · Next Topic »
Add Reply:

Black Water created by tiptopolive of the Zetaboards Theme Zone