Results 1 to 6 of 6

Thread: vb6 cartoon maker demo , simple one

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Oct 2012
    Posts
    24

    vb6 cartoon maker demo , simple one

    hi all
    this was posted by mistake in some wrong place

    http://www.vbforums.com/showthread.p...-so-called-lol

    I am new user , and novice programmer too .
    some days ago I came across this site http://scratch.mit.edu/
    it is about a program called Scratch , by which you make sprites and put them on a stage ..upon the time you can change the stage background , move the sprites etc..all in visual coding interface ..
    I liked to mimic it with my own code in vb6 ..
    I though of "ready to choose" list of actions "called orders" which populated by the user into another list and once the user click play button the listed actions in "scenario" list executed one by one ..
    I started with two options for the backgrounds ( they must be pictures) but i use only colors instead.. and one sprite (shape1) and wait order
    I was thinking of two types of wait , waitshort=1 second , one could repeat it three times to get 3 seconds delay.
    and waitlong = 4 seconds .....
    as I stated .. there must be two listboxs and a button + one sprite (shape).
    anyway ..all in one attachment
    ...
    Now I have ocx to insert gif pictures and lately I got one for inserting swf files which I couldn't upload ! (2.4 MG)
    hope some of you give it a push ..if it isn't worthy we are practice coding anyway;
    thank you

  2. #2

    Thread Starter
    Junior Member
    Join Date
    Oct 2012
    Posts
    24

    Re: vb6 cartoon maker demo , simple one

    and this is another ocx to capture the screen
    http://cuinl.tripod.com/downloads/ac...eenCapture.zip
    this way one may be able to capture the sequence pictures of the scene

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Oct 2012
    Posts
    24

    Re: vb6 cartoon maker demo , simple one

    ??? anybody there ?
    Ok this is one more try.

    * See the attachment
    Attached Files Attached Files

  4. #4
    PowerPoster
    Join Date
    Sep 2006
    Location
    Egypt
    Posts
    2,579

    Re: vb6 cartoon maker demo , simple one

    I don't see any reason for using timers
    Try this
    Code:
    Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
    Private Const mlngMoveStep As Long = 150 ' 150 twips = about 10 pixel
    
    Private Sub Command1_Click()
        Dim ordr As String
        For i = 0 To scn.ListCount
            ordr = scn.List(i)
            Select Case ordr
            Case "background1"
                Form1.BackColor = vbRed
            Case "background2"
                Form1.BackColor = vbBlue
            Case "move-right"
                MoveRight
            Case "move-left"
                MoveLeft
            Case "move-down"
                MoveDown
            Case "move-up"
                MoveUp
            Case "wait"
                Sleep (2000)
            End Select
        Next i
    End Sub
    
    Private Sub MoveRight()
        If Image1.Left <= Form1.ScaleWidth - Image1.Width Then
            Image1.Left = Image1.Left + mlngMoveStep
        End If
    End Sub
    
    Private Sub MoveLeft()
        If Image1.Left > Image1.Width Then
            Image1.Left = Image1.Left - mlngMoveStep
        End If
    End Sub
    
    Private Sub MoveDown()
        If Image1.Top <= Form1.ScaleHeight - Image1.Height Then
            Image1.Top = Image1.Top + mlngMoveStep
        End If
    End Sub
    
    Private Sub MoveUp()
        If Image1.Top > Image1.Height Then
            Image1.Top = Image1.Top - mlngMoveStep
        End If
    End Sub
    
    Private Sub orders_Click()
        scn.AddItem (orders.Text)
    End Sub
    
    Private Sub scn_Click()
        scn.RemoveItem (scn.ListIndex)
    End Sub



  5. #5

    Thread Starter
    Junior Member
    Join Date
    Oct 2012
    Posts
    24

    Re: vb6 cartoon maker demo , simple one

    som cingi rong wiz me ..
    nothing moves ..but I learnt much from your code ..so nice Technics and new keywords that I didn't know before thanks alto.
    I am going to have some time in your site.

  6. #6
    PowerPoster
    Join Date
    Sep 2006
    Location
    Egypt
    Posts
    2,579

    Re: vb6 cartoon maker demo , simple one

    The move starts when you press the command1.



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width