vb Code:
  1. Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick, MyBase.Move
  2.         Dim movepix As Integer
  3.         movepix = 5
  4.         Ball = Me.CreateGraphics
  5.         Ball.Clear(Color.Gray)
  6.  
  7.         If y = 230 Then
  8.             movepix = (movepix * -1)
  9.  
  10.         End If
  11.         If y = 0 Then
  12.             movepix = (movepix * -1)
  13.  
  14.         End If
  15.         If x = 230 Then
  16.             movepix = (movepix * -1)
  17.  
  18.         End If
  19.         If x = 0 Then
  20.             movepix = (movepix * -1)
  21.  
  22.         Else
  23.             x += movepix
  24.             y += movepix
  25.         End If
  26.  
  27.  
  28.         Ball.FillEllipse(Brushes.Yellow, x, y, 20, 20)
  29.     End Sub


this is what i came up with for moving the ball in a pong game i am creating.....all the ball does is travel at a diagonal until it gets stuck in the lower-right corner.....i can't get the balll to richochet or move around the dimensions of the window.....also, i cant find a good was of clear the ball graphic without changing the backfround color.