- Код: Выделить всё
Protected Overrides Sub OnPaint(ByVal e As System.Windows.Forms.PaintEventArgs)
Dim sngControlWidth As Single
Dim sngControlHeight As Single
Dim sngTransformX As Single
Dim sngTransformY As Single
Dim labelColor As Color
Dim labelBorderPen As New Pen(labelColor, 0)
Dim labelBackColorBrush As New SolidBrush(labelColor)
Dim labelForeColorBrush As New SolidBrush(MyBase.ForeColor)
e = New System.Windows.Forms.PaintEventArgs(e.Graphics, e.ClipRectangle)
sngControlWidth = Me.Size.Width
sngControlHeight = Me.Size.Height
e.Graphics.DrawRectangle(labelBorderPen, 0, 0, _
sngControlWidth, sngControlHeight)
e.Graphics.FillRectangle(labelBackColorBrush, 0, _
0, sngControlWidth, sngControlHeight)
' set the translation point for the
' graphics object - the new (0,0) location
sngTransformX = 0
sngTransformY = sngControlHeight
' translate the origin used for rotation and drawing
e.Graphics.TranslateTransform(sngTransformX, _
sngTransformY) ' (0, textwidth)
'set the rotation angle for vertical text
e.Graphics.RotateTransform(270)
' draw the text on the control
e.Graphics.DrawString(labelText, Font, _
labelForeColorBrush, 0, 0)
End Sub
Всё замечательно, только вот дизайнер форм перестаёт показывать вкладку(у меня прога на табах держится), на которой данная метка нанесена. Подскажите, что делать?