Find Code:
All Words
Any of the Words
Exact Phrase
Home
:
Code
:
Forums
:
Submit
:
Mailing List
:
About
:
Contact
Code
All
VB.NET
ASP.NET
C#
VB Classic
ASP Classic
Snippets
Popular
Resources
Submit Code
Forums
Articles
Tips
Links
Books
Contest
Link to us
Vertical/Horisontal Label - To try this example, p...
Author:
Alexander Anikin
Website:
http://hotmix.narod.ru
Submitted:
5/10/2002
Version:
VB4
Compatibility:
VB4, VB5, VB6
Category:
Controls
Views:
9583
Vertical/Horisontal Label - To try this example, paste the code into the Declarations section of a form containing a CommandButton named Command1 and a Label named Label1, and then press F5 and click the button twice.
Declarations:
'none
Code:
'© 2002 by Alexander Anikin '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
Home
|
Forums
|
Submit
|
Books
|
Mailing List
|
Advertising
|
About
|
Contact
© 2024 A1VBCode. All rights reserved.
Legal disclaimer & terms of use
Privacy statement