VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Text effect for about boxes and things like that.

by Blue Phreak (2 Submissions)
Category: Miscellaneous
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sat 23rd November 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Text effect for about boxes and things like that.

API Declarations


Dim i As Integer
Dim send As String

Rate Text effect for about boxes and things like that.



    checksend = Len(Text1.Text)         ' Sets up the i code
    i = 1                               ' I needs to be 1 to set the start position
    tmrsend.Interval = Text3.Text       ' Sets the Timer Interval befor beginning
    tmrsend.Enabled = True              ' Enables the timer
    Text2.Text = ""                     ' Clears Text2 to stop any repeating
    Text2.Text = Text1.Text             ' Sets Text2's text to Text1's text
    Text1.Text = ""                     ' Clears Text1's Text
End Sub

Private Sub HighlightCode()
    Text1.SelStart = 0                  ' Sets the home position
    Text1.SelLength = checksend         ' Sets the highlight to all letters
End Sub

Private Sub SendCode()
    If i <= checksend Then              ' if check send above i then
        send = Mid(Text2.Text, i, 1)    ' Sets up Send to be the next letter or text2
        i = i + 1                       ' Sets up i for the next letter
        Text1.Text = Text1.Text & send  ' Sends the letter to the text box without it erasing Text1's text
    Else
        Command1_Click                  ' Optional for added Effect
    End If
End Sub

Private Sub SpeedCode()
    Text3.Text = Text3.Text - 25         ' Changes the speed of the Timer
    If Text3.Text < 50 Then              ' If the Text number Under 50 then reset it
        Text3.Text = 375                 ' To this value
    End If
    tmrsend.Interval = Text3.Text        ' Sets the Interval to Text3
End Sub

Private Sub Command1_Click()
    GetCode                              ' Needed, so the user can do what he wish's
End Sub

Private Sub Form_Load()
    Me.Height = 2580                     ' Makes only the text box visible to the user, or you can skip this and let the user do his own thing.
    ' Label1.Caption = "Interval" + vbNewLine + "(1000 = 1 second)"
    Command1_Click                       ' Calls for the HIDDEN command button to be pressed, can also call the sub
End Sub

Private Sub Text1_Click()
    SpeedCode                            ' Optional for added Effect
End Sub

Private Sub Text1_DblClick()
    SpeedCode                            ' Optional for added Effect
End Sub

Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
    If KeyCode = 27 Then                 ' KeyCode Value 27 is Escape
        End                              ' Since there is no X button the user needs to exit by hitting the ESC Key, When key is pressed it will exit
    End If
End Sub

Private Sub tmrsend_Timer()
    SendCode                             ' This is what its all about
    HighlightCode                        ' Optional for added Effect
End Sub


Download this snippet    Add to My Saved Code

Text effect for about boxes and things like that. Comments

No comments have been posted about Text effect for about boxes and things like that.. Why not be the first to post a comment about Text effect for about boxes and things like that..

Post your comment

Subject:
Message:
0/1000 characters