Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Big animation
Index -> Programming, Visual Basic and Other Basics -> Visual Basic Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Raknarg




PostPosted: Thu Jun 09, 2011 10:03 am   Post subject: Big animation

So I have this task in class to make an animation. I have about 248 slides (starting from 0) that I'm using for it. This is what I have so far:
VisualBASIC:

Public Class Form1
    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        Do
            For i = 0 To 247
                If i < 10 Then
                    Me.Picture.Image = New System.Drawing.Bitmap("P:\Pivot Files\martial arts00" + Str(i) + ".bmp")
                ElseIf i < 100 Then
                    Me.Picture.Image = New System.Drawing.Bitmap("P:\Pivot Files\martial arts0" + Str(i) + ".bmp")
                Else
                    Me.Picture.Image = New System.Drawing.Bitmap("P:\Pivot Files\martial arts" + Str(i) + ".bmp")
                End If
            Next
        Loop
    End Sub
End Class

My issue is that whenever I put Str(i) inside the brackets, it tells me "This parameter is not valid. I've taken it out and it works. Any help here?
Sponsor
Sponsor
Sponsor
sponsor
Raknarg




PostPosted: Thu Jun 09, 2011 10:08 am   Post subject: RE:Big animation

The reason i do it this way is so that I dont have to import over 200 pictures.
Raknarg




PostPosted: Thu Jun 09, 2011 10:36 am   Post subject: RE:Big animation

never mind, solved it -.-'
Display posts from previous:   
   Index -> Programming, Visual Basic and Other Basics -> Visual Basic Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: