Results 1 to 2 of 2

Thread: Animation

  1. #1
    Join Date
    Feb 2004

    Unanswered: Animation

    I want to make an image move from one side of my swithboard to the other-when the db is opened. How do i do this?

    I realise 99.9% of you guys know the answers to my questions-but we all have to satrt somewhere right?

    I am attempting to do this with a Jpeg image-is this ok? or does it have to be a different format of file.

  2. #2
    Join Date
    Sep 2003
    I worked with an inserted picture that was from a .jpg file.

    This is fairly straight forward math, once you know the conversion rules.

    My pic was .7188" wide and the total width of the form was 9.833" wide. Because my pic start with a left of 0", the distance to be travelled is (9.833 - .7188) 9.1145". I decided that I wanted the pic to move over at 0.01" at a time because 0.1" is too fast.

    This means I need to iteratively change the Left property of my image, this is measured in twips. There are 567 twips in a cm, there are 2.54 cm in an inch, so there are 1440.18 twips in an inch (My regional settings are in US Meas). So I want my image to increment its Left 144.018 twips at a time by 92 times (this is approximate because this is not something *I* need perfection on.

    Dim i As Integer
    For i = 0 To 920
    Me.Image1.Left = Me.Image1.Left + 14.4018
    Next i

    Note the use of .Repaint. This allows you to see the image sliding instead of appearing.

    All code ADO/ADOX unless otherwise specified.

Posting Permissions

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