|
-
May 2nd, 2000, 12:34 AM
#1
Thread Starter
New Member
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?
-
May 2nd, 2000, 12:51 AM
#2
Lively Member
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.
-
May 2nd, 2000, 01:06 AM
#3
Yes, I think the only way is to draw a line over them.
-
May 2nd, 2000, 01:15 AM
#4
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
-
May 2nd, 2000, 01:17 AM
#5
Frenzied Member
or just stick a Shape Control behind it.
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
|