Hi! I am new in vb.net and use it in our game programming. I don't know if this is the same in what they do.

Here's the code. Thanks! :)

Dim jeepEnemyGallery As New jeepGallery

        Me.y = CInt(Int((8 * Rnd(1)) + 1))

        Select Case y

            Case 1 To 2
                jeepEnemy = jeepEnemyGallery.car1
                Me.Location = New Point(300, 800)
                jeepEnemySpeed = 10


            Case 3 To 4
                jeepEnemy = jeepEnemyGallery.car2
                Me.Location = New Point(300, 900)
                jeepEnemySpeed = 15

            Case 5 To 6
                jeepEnemy = jeepEnemyGallery.car3
                Me.Location = New Point(600, 900)
                jeepEnemySpeed = 10

            Case 7 To 8
                jeepEnemy = jeepEnemyGallery.car4
                Me.Location = New Point(600, 900)
                jeepEnemySpeed = 15

        End Select

        jeepEnemyGallery.Dispose()

Here's the other code:

Me.y = CInt(Int((8 * Rnd(1)) + 1))

        Select Case y
            Case 1 To 2
                jeepEnemy.Image = My.Resources.car1
                Me.Location = New Point(300, 900)
                jeepEnemySpeed = 10


            Case 3 To 4
                jeepEnemy.Image = My.Resources.car2
                Me.Location = New Point(300, 900)
                jeepEnemySpeed = 15

            Case 5 To 6
                jeepEnemy.Image = My.Resources.car3
                Me.Location = New Point(600, 900)
                jeepEnemySpeed = 10

            Case 7 To 8
                jeepEnemy.Image = My.Resources.car4
                Me.Location = New Point(600, 900)
                jeepEnemySpeed = 15

        End Select

By the way, the latter works. It shows the image. But, have problem while moving it.

Anyway, i want the picture to appear randomly and in different locations while moving it.

This article has been dead for over six months. Start a new discussion instead.