student in need of help
hello everyone . I'm taking my first class in visual basic (first time writing code) and have been doing ok. The lastest project has me stumped and I was hoping someone could give me some help. I'm to make a class called "robot" with a method for movig it. The robot is a simple label that moves on the form. I have 6 buttons, 4 to change direction of the movement (the label is set to appear as an arrow pointing in the direction chosen). The last two buttons either make it go 1 or 10 in the chosen direction. So what kind of method do I need to make the "robot" move?
Thanks in advance
Just set the label's .Left or .Top properties to the desired value. For example, to move it left 10 pixels:
RobotLabel.Left -= 10
Please post questions to the forums, where others may benefit.
I do not offer free assistance by e-mail. Thank you!
Thanks for the reply. But I'm not sure that will work for me. I need for one of the for direction buttons to set the direction. Then when the user presses the 1 or 10 button, it move that many pixels in the earlier specified direction.
So, put Phil Weber's example in the "Left" movement button...
I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
Please use [Code]your code goes in here[/Code] tags when posting code.
Before posting your question, did you look here
Got a question on Linux? Visit our Linux sister site.
Modifications Required For VB6 Apps To Work On Vista
Last Post: 11-19-2007, 03:51 PM
Last Post: 07-16-2007, 09:36 PM
Last Post: 07-16-2006, 08:25 PM
By WillisTi in forum Java
Last Post: 02-25-2005, 06:35 AM
By Munchkin in forum Java
Last Post: 03-16-2001, 04:58 PM
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center