-
Force Colours?
1. Is there a possibility to change the Backcolor of a toolbar
even though it's not provided as a property of it?
2. Is it possible to change the backcolor of a ComboBox dropdown
arrow?
-I've seen code about how to change the forecolour of CommandButtons, so I thought this could be somehow managable as well.
It'd be awesome if someone of you guys could tell me about that.
Tank You!
-
Toolbar backcolor
Did you find out how to force the background color of the toolbar. We have the same problem, we are using skins in our application and want to make the toolbar use the same backcolor as the skin.
-
no, unfortunately not :(
But maybe someone else knows. I think it must be possible by getting the RECT and then overdraw the area.
-
I tried the following:
module:
Public hdcColor As Long, hdcScreen As Long
Public Declare Function CreateCompatibleDC Lib "gdi32" (ByVal hdc As Long) As Long
Public Declare Function SetBkColor Lib "gdi32" (ByVal hdc As Long, ByVal crColor As Long) As Long
Public Declare Function GetDC Lib "user32" (ByVal hWnd As Long) As Long
form:
Private Sub Command1_Click()
hdcScreen = GetDC(Toolbar1.hWnd)
hdcColor = CreateCompatibleDC(hdcScreen)
SetBkColor hdcColor, vbBlack
End Sub
this should set for example the backcolor of the Toolbar to black but it doesn't work. :(
-
We have a workaround
We havent found a direct solution to the background color problem, but we have a workaround. Download this free toolbar OCX from http://freevbcode.com/ShowCode.Asp?ID=344 you can change the background color in this one.
Hope it helps.
-
that's great, nice one! :D