How can I change the scrollbar color?
Printable View
How can I change the scrollbar color?
http://www.planetsourcecode.com/xq/A...s/ShowCode.htm
I found this, give it a try.
scroll bar and progress bar is not the same Jester.
He said scrollbar.
I believe the only way would be to subclass it. I don't really know how, but I was going to try sometime soon. If I do, I'll post it.
I'm sorry Its christmas eve man I'm allowed to be illiterate today
You can not change the color of scroll bar.
Yes, you can.
vcv I know you can do it with html but we are talking about VB here.
And instead of a "Yes" give the answer......
I know we're talking about VB.
I haven't attempted it, but I will sometime this week.
I do not see how you can do that because no api who can do that and you can not change the property of the scrollbar... maybe some one have made a ocx but I doubt.
SUBCLASSING
Well I do not understand what is SubClassing... Can you tell me what is it and how to use it ?
Use SetWindowLong to specify the address of new Window Procedure via the AddressOf operator. The new procedure (function in VB) must have certain parameters. hWnd, uMsg, wParam, lParam. I think that's the order too... In the function, you handle the messages yourself...or at least the ones you can to behave differently. Like you can only have WM_SIZE, and then use CallWindowProc with the old procedure address (which you should store from the return value of the call to SetWindowLong), and parameters to let windows handle the rest of the stuff.
For scrollbars, you may handle.. WM_DRAWITEM and WM_MEASUREITEM to draw different colors. That's how you change the appearance of menus at least.
hmmm i know someone who has written a custom control. If i can find it i will put it on this topic. I don't know if it uses colours though, it could be modified
I found a custom scrollbar ocx on www.planetsourcecode.com some weeks ago.
Here is the link:
http://www.planetsourcecode.com/xq/A...s/ShowCode.htm
I found a solution here
http://www.vb-world.net/tips/tip8.html
The problem is that the colour then changes for all the application.
If we find a solution for the scrollbar, we can probably use it for controls like the TabStrip too.