-
Is there a way to change the color of the border color in a standard label control? When you change the label's appearance property to 'Flat' and borderstyle to 'Fixed Single,' it gives the label a black border. Is there a way to change the color of the border though some API method?
-
Someone correct me if i'm wrong.
You are going to be stuck with what vb gives you. A label is no more than telling vb to draw something on a form. Since this is a vb only operation, windows does not know that the label exists and therefore cannot manipulate it in any way.
-
Yes, I think the only way is to draw a line over them.
-
To make it easy
Code:
Private Sub Command1_Click()
Call DrawBorder(Label1, vbRed)
End Sub
Private Sub DrawBorder(lbl As Label, Color As OLE_COLOR)
With lbl
Me.Line (.Left, .Top)-(.Left + .Width - Screen.TwipsPerPixelX, .Top + .Height - Screen.TwipsPerPixelY), Color, B
End With
End Sub
-
or just stick a Shape Control behind it.