Picture transitions

Discussion in 'Questions (Windows Mobile)' started by TonnyVanmunster, May 28, 2009.

  1. TonnyVanmunster

    TonnyVanmunster Member Licensed User


    I'm quite new to this forum but I like it a lot. I'm working on a small project in Basic4PPC and have a question related to picture/photo animations.

    'd like to load a first picture. Then, when sliding from right to left with my finger over the picture, the picture should gradually move to the left of the screen, while a newer picture gradually becomes visible. After a second or so, the first picture should be gone, and the new one should be all visible.

    Is there an easy way to create this "transition-between-pictures" behaviour using any of the Basic4PPC libraries ? An actual code snippet would be great !

    Thanks !
  2. derez

    derez Expert Licensed User

    Try the code below and play with the parameters, it is not actually fluent but moves.
    Create the following controls: image1 (with an image, select stretched option), button1 and timer1.

    Sub Globals
    'Declare the global variables here.
    count = 0
    End Sub

    Sub App_Start
       timer1.Interval = 
       timer1.Enabled = 
    End Sub

    Sub Button1_Click
    timer1.Enabled = 
    End Sub

    Sub Timer1_Tick
    image1.Left = image1.Left - 
    image1.Top = image1.Top -
    image1.Width = image1.Width * 
    image1.Height = image1.Height * 
    count = count + 
    If count = 30 Then timer1.Enabled = False
    End Sub
  3. agraham

    agraham Expert Licensed User

  4. TonnyVanmunster

    TonnyVanmunster Member Licensed User

    Thanks a lot - the ImageLibEx routines do the job in an excellent way !

  5. TonnyVanmunster

    TonnyVanmunster Member Licensed User

    PushTop and PushBottom in ImageLibEx ?

    One more question on ImageLibEx : there are PushRight and PushLeft methods, but apparently no PushTop and PushBottom methods. Are those extensions still planned ?

    Best regards,
  6. agraham

    agraham Expert Licensed User

    Still? I don't think I have indicated anywhere that I was considering this. No, I am not planning to add anything to this library at the moment. I'll make a note to consider this if/when I need to revisit the code.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice