|
-
May 28th, 2001, 03:34 PM
#1
Thread Starter
Registered User
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!
-
Jun 4th, 2001, 09:13 AM
#2
New Member
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.
-
Jun 4th, 2001, 09:58 AM
#3
Thread Starter
Registered User
no, unfortunately not 
But maybe someone else knows. I think it must be possible by getting the RECT and then overdraw the area.
-
Jun 4th, 2001, 10:33 AM
#4
Thread Starter
Registered User
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.
-
Jun 5th, 2001, 03:02 AM
#5
New Member
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.
-
Jun 5th, 2001, 11:00 AM
#6
Thread Starter
Registered User
that's great, nice one!
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
|