Results 1 to 3 of 3

Thread: Help... for a begginer! please!!!

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2000
    Location
    Israel
    Posts
    636
    Hi, Everybody!

    I'm a begginer and I have a problem:
    Why when I do like this:
    **Example**
    Sub Timer1()

    Image1.Picture = Image2(x).Picture
    x = x + 1
    If x = 3 then x = 0

    End Sub
    ** End **

    Then When it works, it does some background color flashes
    within the image1.
    It interupt the animation.
    I know you would recommand me BitBlt.
    But I want to know if there is any way to fix it.

    Anyway Thank you all,
    Arie.

    Visit: http://www.nip.to/camel2000

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Not really. The problem is that what happens is this:

    1. Image1 has an image
    2. Clear Image1
    3. Paint new image on Image1

    You need to cut out stage 2, and BitBlt is the easiest way of doing this. (sorry)
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  3. #3
    Guest
    I tried your code and it didn't work. Reason being is you didn't declare X as Static.

    Code:
    Private Sub Timer1_Timer()
    
        Static x
        Image1.Picture = Image2(x).Picture
        x = x + 1
        If x = 3 Then x = 0
    
    End Sub
    Also, try setting the AutoRedraw property to True.

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