New to VB, looking for input
So ive got some experience programming now. I've taken 2 classes, one in vb the other in Java. Neither were very good. So i am experimenting on my own. just messing around i came up with the following bit. I was hoping someone could provide input on how to make it better or ideas about what to do with it, style, things like that. Anything really. I just want to improve my coding. Basically images of heads fall down the screen and your move left and right to catch them in the image of a basket. based on GoT lol.
Code:
Public Class Form1
Dim x1_intercept = 331
Dim y1_intercept = 12
Dim x2_intercept = 307
Dim y2_intercept = 461
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Integer) As Short
Dim count As Integer = 0
Dim score As Integer = 0
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Timer1.Start()
End Sub
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
Randomize()
y1_intercept = y1_intercept + 3
pbx1.Location = New Point(x1_intercept, y1_intercept)
If (GetAsyncKeyState(37)) Then
x2_intercept = x2_intercept  4
End If
If (GetAsyncKeyState(39)) Then
x2_intercept = x2_intercept + 4
End If
pbx2.Location = New Point(x2_intercept, y2_intercept)
Dim lower As Boolean
If x1_intercept > (x2_intercept  62) Then
lower = True
Else : lower = False
End If
Dim upper As Boolean
If x1_intercept < (x2_intercept + 122) Then
upper = True
Else : upper = False
End If
If y1_intercept > y2_intercept  56 And ((lower = True) And (upper = True)) Then
RandomStart()
head()
score += 1
lbl2.Text = score
ElseIf y1_intercept > y2_intercept And ((lower = False) Or (upper = False)) Then
MessageBox.Show("You Lost the Game of Thrones!" & vbNewLine & "Your caught " & score & " Stark heads")
Me.Close()
End If
End Sub
Private Sub RandomStart()
Dim rand As Integer = (Int(698  1) * Rnd()  1)
x1_intercept = rand
y1_intercept = 12
pbx1.Location = New Point(x1_intercept, y1_intercept)
End Sub
Private Sub head()
Dim i As Integer = Int(6  0) * Rnd()  0
If i = 1 Then
pbx1.Image = Image.FromFile("arya.jpg")
ElseIf i = 2 Then
pbx1.Image = Image.FromFile("ned.jpg")
ElseIf i = 3 Then
pbx1.Image = Image.FromFile("catelyn.jpg")
ElseIf i = 4 Then
pbx1.Image = Image.FromFile("sansa.jpg")
Else
pbx1.Image = Image.FromFile("robb.jpg")
End If
End Sub
End Class

Last edited by passel; 06212013 at 07:55 PM.
Reason: added code/code tags
