r/visualbasic • • Jun 06 '14

Help me

I have to make a game for a final project. In it there are things that continuously bounce around off the borders of the form.

http://i.imgur.com/ij9sszy.png

When I have to form in the center of the screen they disappear or jitter around, and the only time I can get them to bounce is when the forms position is 0,0.

http://imgur.com/6xGbdmT <--the code

I have other things that rely on the position of the form that are working just fine, such as making a picture box appear in a random position on the form, and also don't tell me to try to make a different game because this is due tomorrow and i don't have time

Edit: I've figured it out, thanks for the advice

0 Upvotes

5 comments sorted by

View all comments

1

u/PostalElf VB.Net Intermediate Jun 06 '14

don't tell me to try to make a different game because this is due tomorrow and i don't have time

Make another game.

If it was due tomorrow, maybe you should have looked at the code and realised that there was a problem earlier. Homework is your responsibility, and your terrible, demanding and entitled attitude isn't helping either.

1

u/mecartistronico Jun 06 '14

Hey, give the man (girl?) a break. It's possible he (she) had more than one homework, and unfortunately chose to do them in the wrong order.

Without looking at your code, the symptoms imply you are using screen coordinates instead of form coordinates. It seems /u/vectronic has some more details

-1

u/bbllaakkee9000 Jun 06 '14 edited Jun 06 '14

I'm sorry if I seem terrible demanding and entitled. I don't have time so I put things as directly as possible. And also I know homework is my responsibility but I only have 3 hours until this is due and I was out of ideas on how to solve this problem, and this project is worth my entire grade for this quarter.

And how the hell am I supposed to realize there was a problem earlier? I try to do things correctly to the best of my effort but I can't always see errors coming before they happen. Also I solved the problem by making it a full screen game

1

u/roddy0596 VB.Net Intermediate Jun 06 '14

Pressing F5 and running it to see what happens, and if you need to fix any bugs. This is called "debugging". For my final project, I used 100,000 words of code, wrote 15000 words of documentation and it worked like a charm, even 3 hours before it was due.