VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Vertical/Horisontal Label - To try this example, paste the code into the Declarations section of a

by Alexander Anikin (8 Submissions)
Category: Miscellaneous
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Sun 19th May 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Vertical/Horisontal Label - To try this example, paste the code into the Declarations section of a form containing a CommandButton named

Rate Vertical/Horisontal Label - To try this example, paste the code into the Declarations section of a



'for more my code samples
'visit my personal web site:
'http://hotmix.narod.ru

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 < Len(nStr) 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

Private Sub Form_Load()
Me.Left = (Screen.Width - 4800) / 2
Me.Top = (Screen.Height - 3600) / 2
Me.Caption = "visit - http://hotmix.narod.ru"
Me.ScaleMode = 1
Me.Width = 4800
Me.Height = 3600
Me.BackColor = &HFF8080
Label1.AutoSize = True
Label1.BackColor = vbWhite
Label1.ForeColor = &HFF8080
Label1.BorderStyle = 1
Label1.FontName = "Arial Black"
Label1.FontBold = True
Label1.FontSize = 10
Label1 = "HELLO"
Label1.Left = 600
Label1.Top = 1200
Command1.Width = 1455
Command1.Height = 375
Command1.Left = 1860
Command1.Top = 1200
Command1.Caption = ".click me twicE"
End Sub


Download this snippet    Add to My Saved Code

Vertical/Horisontal Label - To try this example, paste the code into the Declarations section of a Comments

No comments have been posted about Vertical/Horisontal Label - To try this example, paste the code into the Declarations section of a . Why not be the first to post a comment about Vertical/Horisontal Label - To try this example, paste the code into the Declarations section of a .

Post your comment

Subject:
Message:
0/1000 characters