VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



String's each Character drop down to and from bottom of form

by Umashankar Yadav (2 Submissions)
Category: Miscellaneous
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Mon 1st September 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)

String's each Character drop down to and from bottom of form

API Declarations



Dim str As String
Dim lenstr As Integer
'///paste the declaration in form load event.
Dim left1 As Long
Dim top1 As Long
Dim i As Integer
Dim j As Integer

Rate String's each Character drop down to and from bottom of form



'property false. Place one textbox and Command Button. Place one Timer set its
enabled property to false and make its timer interval to 50.

'Paste the code in Form Load event.
Private Sub Form_Load()
    left1 = 0
    top1 = 0
    j = 0
End Sub


Public Sub Nameonform()
    
If Label1.uBound > 0 Then
   For i = 1 To Len(str)
        Unload Label1(i)
        left1 = 0
        top1 = 0
    Next
End If
    
    str = Text1
    lenstr = Len(str)
        
    For i = 1 To lenstr
        
        Load Label1(i)
        Label1(i).Left = left1
        Label1(i).Top = top1
        Label1(i).Caption = Mid(str, i, 1)
        Label1(i).Visible = True
        left1 = Label1(i).Left + Label1(i).Width + 10
        
    Next
    
End Sub
Private Sub Command1_Click()
    Call Nameonform
    i = 1
    Timer1.Enabled = True
End Sub

Private Sub Timer1_Timer()
    
If i > Len(str) Then
    Timer1.Enabled = False
    For i = 1 To Len(str)
        Unload Label1(i)
        left1 = 0
        top1 = 0
    Next
    Command1_Click
Else

If Label1(i).Caption = " " Then
    i = i + 1
End If

    Label1(i).Top = Label1(i).Top + 100
    
    If Label1(i).Top = 1200 Then
        i = i + 1
    End If


End If


End Sub
Public Sub interrupt()
    Timer1.Enabled = False
    Timer1.Enabled = True
End Sub



Download this snippet    Add to My Saved Code

String's each Character drop down to and from bottom of form Comments

No comments have been posted about String's each Character drop down to and from bottom of form. Why not be the first to post a comment about String's each Character drop down to and from bottom of form.

Post your comment

Subject:
Message:
0/1000 characters