-
Hello, I have a custom .CTL file in my APP.
And, Its a COMMAND BUTTON.
IT works fine, i have code to change the TEXT color, and the BACK COLOR
But.. The Edges around the Control are still Grey
heres what it is like
.---------- .(GREY)
| HEY |
| |
.-----------.(GREY)
The text is a color, the Background is a color.
BUT i can't get the GREY color to change.
I cna't find any code that changes the border color in the CTL..
Any help?
-
What about drawing your own lines with the Line method? That's what I did when I created a button.
-
I tryed that, but the grey was still there, and the lines didn't work too good
-
if it helps this is what i have, i need to change the color tho
Code:
Select Case BorderType
Case btUp
If bFocus Then
Call DrawEdge(UserControl.hdc, rct, BDR_OUTER, BF_RECT Or BF_ADJUST)
Call DrawEdge(UserControl.hdc, rct, EDGE_RAISED, BF_RECT)
Else
Call DrawEdge(UserControl.hdc, rct, EDGE_RAISED, BF_RECT)
End If
Case btOver
Call DrawEdge(UserControl.hdc, rct, EDGE_RAISED, BF_RECT)
Case btDown
If bFocus Then
Call DrawEdge(UserControl.hdc, rct, BDR_OUTER, BF_RECT Or BF_ADJUST)
Call DrawEdge(UserControl.hdc, rct, BDR_SUNKENOUTER, BF_RECT)
End If
End Select
that is in the DRAW BUTTON thing
and this is come declares that are in it
Code:
Private Const BDR_RAISEDINNER = &H4
Private Const BDR_RAISEDOUTER = &H1
Private Const BDR_SUNKENINNER = &H8
Private Const BDR_SUNKENOUTER = &H2
Private Const BDR_RAISED = &H5
Private Const BDR_OUTER = &H3
Private Const BDR_INNER = &HC
Private Const EDGE_RAISED = (BDR_RAISEDOUTER Or BDR_RAISEDINNER)
Private Const EDGE_SUNKEN = (BDR_SUNKENOUTER Or BDR_SUNKENINNER)
Private Const EDGE_BUMP = (BDR_RAISEDOUTER Or BDR_SUNKENINNER)
Private Const EDGE_ETCHED = (BDR_SUNKENOUTER Or BDR_RAISEDINNER)
-
1 Attachment(s)
heres a module I made it might help you get a better border