VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Sample animation (it's your choice for application)

by (OCC)Lhewor Ely (1 Submission)
Category: Miscellaneous
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Mon 4th June 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Sample animation (it's your choice for application)

API Declarations


-create a form
-a button, with a "Start" Caption
-a label


Rate Sample animation (it's your choice for application)



Private Sub Command3_Click()
Dim txtpos As Integer
Dim backpos As Integer

x = 0
If Command3.Caption = "Start" Then

Command3.Caption = "Stop"

10:
If x = 1 Then
Text0.Left = Text0.Left
Exit Sub
End If

For txtpos = 1 To 1000 Step 0

     DoEvents
     Text0.Left = Text0.Left + 10

         If Text0.Left = 9785 Then
         GoTo 20
         End If

Next txtpos

20:
    
For backpos = 1 To 1000 Step 0
                
DoEvents
                Text0.Left = Text0.Left - 10

        If Text0.Left = 185 Then
             GoTo 10
             Exit For
         End If
        
     Next backpos
   
End If
    
If Command3.Caption = "Stop" Then

    Command3.Caption = "Start"
    x = 1

End If

End Sub

______________________
'Optional

Private Sub Form_Load()
Dim name

name = InputBox("Insert a 6 letter name")
Text0.Caption = name

End Sub

*****************************************
Enroll now at Olongapo City Colleges **
*****************************************


Download this snippet    Add to My Saved Code

Sample animation (it's your choice for application) Comments

No comments have been posted about Sample animation (it's your choice for application). Why not be the first to post a comment about Sample animation (it's your choice for application).

Post your comment

Subject:
Message:
0/1000 characters