Results 1 to 5 of 5

Thread: moving image help

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Oct 2000
    Posts
    23

    Question

    Hi everybody!
    can anyone tell me agood way of making an image float randomly around the screen? i've tried 'do until ' and 'if then' without getting the results I want.
    Thanks in advance for any suggestions.

  2. #2
    Fanatic Member ExcalibursZone's Avatar
    Join Date
    Feb 2000
    Location
    Western NY State
    Posts
    908
    how do you mean float randomly?
    Like disappear from one set of coordinates and appearing at another? following a path from one set of coordinates to another? what is it for? screen saver? game?

    a little more info for us to help out if you could
    -Excalibur

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Oct 2000
    Posts
    23

    re moving image

    Hi !
    Thanks for the reply,yes I want to use this in a screensaver
    by moving randomly I mean move up the screen until it hits the top and then say 'bounce' off and move back down at a new angle etc.
    thanks!!

  4. #4
    Frenzied Member markman's Avatar
    Join Date
    Nov 2000
    Location
    Florida.
    Posts
    1,197
    try the msdn example 'blanker.' It has a moon bounce around the screen.
    retired member. Thanks for everything

  5. #5
    Guest
    You could have floating object moving around horizontally and vertically.

    Code:
    Private Sub Timer1_Timer()
        'Vertical
        Do Until Me.Top = 0
            Me.Top = Me.Top - 10
            DoEvents
        Loop
        Do Until Me.Top = Screen.Height
            Me.Top = Me.Top + 10
            DoEvents
        Loop
        Timer1_Timer
        
    End Sub
    
    
    Private Sub Timer2_Timer()
        'Horizontal
        Do Until Me.Left = 0
            Me.Left = Me.Left - 10
            DoEvents
        Loop
        Do Until Me.Left = Screen.Width
            Me.Left = Me.Left + 10
            DoEvents
        Loop
        Timer2_Timer
        
    End Sub

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