Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

Attention to anyone who is a Visual Basic expert?

I am working on a simple project where I make a car move in different directions and at different speeds. I have figured all of that out but have a really big problem.

My teacher wants me to have the car wrap around when it reaches the end of the screen. For instance, if the car went all the way in the up direction out of the screen, he wants it to come from the bottom of program. And if it goes all the way in the left direction out of the screen, he wants it to reappear from the right side, moving left still.

Is there a common chain of commands or script that could help me accompish this? I know I am being very broad in this, but I don't know how to explain it better. I am very baffled on how I am ever going to accomplish this.

Update:

I was told by my instructor that using Me.Width and Me.Height lets you determine the attributes of the form, but it isnt working out at all. I type it in the code somewhere right?

1 Answer

Relevance
  • 1 decade ago
    Favorite Answer

    Here's a hint:

    Determine the width of the form or screen, and the car's position respective to it.

    If the car's horizontal position equals the width, set the position to 0; same goes for vertical position.

Still have questions? Get your answers by asking now.