|
Вертикальное/горизонтальное написание в элементе Label |
|
|
Расположите на форме элемент CommandButton а также элемент Label Private Function Vertical_Horizontal(ByVal nStr As String) As
String
Dim MyStr As String, i As Integer
Static Vert As Boolean
If Vert = False Then
For i = 1 To Len(nStr)
If i Then
MyStr = MyStr + Mid$(nStr, i, 1) & vbCrLf
Else
MyStr = MyStr + Mid$(nStr, i, 1)
End If
Next
Vertical_Horizontal = MyStr
Vert = True
Else
For i = 1 To Len(nStr) Step 3
MyStr = MyStr + Mid$(nStr, i, 1)
Next
Vertical_Horizontal = MyStr
Vert = False
End If
End Function
Private Sub Command1_Click()
Label1.AutoSize = True
Label1.Caption = Vertical_Horizontal(Label1.Caption)
End Sub
'© 2001 by Alexander Anikin
'http://www.i.com.ua/~aka
|
|
|
|
|
|
|