How do create a program that has a ball bouncing around the screen and a small  square shape in the middle of the screen.  How do you program to have a ball bouncing off the shape and the sides of the form?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jkro34Author Commented:
I am just beginning to program in VB. This question is like pong and  probably is pretty easy.
to make the ball bounce off of the left side of the center block write the following:

if (shape1.left + shape1.width > label1.left)  and
  (shape1.left + shape1.width < label1.left + 200)  and
  (shape1.top > label1.top) and
  (shape1.top+shape1.height<label1.top +label1.height)
then your code goes here

the 4 arguements can be adjusted to work for the 4 sides of label1 (the block) and shape1 (the ball)

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.