Dim moveLeft As Boolean Dim username As String Dim moveRight As Boolean Dim btnstart As Boolean Dim landerXPosition As Single Dim landerYPosition As Single Dim landingpadXPosition As Single Dim thrust As Single Dim fuel As Single Dim intro As String Dim speed As Single Dim userInput As String
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
lblIntro.Visible = True ' intro is visiable to the user landerXPosition = piclander.Top ' the pic lander is on top of the form landerYPosition = piclander.Left ' the pic lander is left of the form
txtUsername.Focus() 'foucs the username
Randomize() landerXPosition = Int(Rnd() * 500) ' it randomly position the pic lander landerYPosition = -piclander.Height + 20 ' the pic lander appers below the form
picLandingpad.Left = Int(Rnd() * 450) ' the landing pad randomly appers landingpadXPosition = picLandingpad.Left ' the position of the panding pad is on the x position
piclander.Left = landerXPosition ' pic lander is position left on the x axis piclander.Top = landerYPosition ' pic lander is position top on y axis
testing = True If testing Then Console.WriteLine(vbCrLf & Now) Console.WriteLine("landerXPosition = " & landerXPosition) Console.WriteLine("landerYPosition = " & landerYPosition) Console.WriteLine("LandingPadXPosition = " & landingpadXPosition)
Console.WriteLine("Lander X position: " & landerXPosition) lblremfuel.Text = ("Lander Y position: " & landerYPosition) End Sub
Private Sub button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)