Images+(VB)

//**The moveLeft procedure is specified, as the picture box moving to the left 5 pixels and the y value not changing at all.**// Public Sub moveLeft pbxMonster.Location = New Point(pbxMonster.Location.X + 5, pbxMonster.Location.Y) End Sub //The moveLeft procedure is specified, as the picture box moving to the right 5 pixels and the y value not changing at all.// Public Sub moveRight pbxMonster.Location = New Point(pbxMonster.Location.X - 5, pbxMonster.Location.Y) End Sub
 * USING A PROCEDURE!!!!**
 * Move Left = +**
 * Move Right = - **

Public Sub OnTimerEvent( ByVal [source] As Object, ByVal e As EventArgs) moveLeft End Sub
 * //__When Timer Begins:__// **
 * The moveLeft procedure is called and executed!!!!!!!**
 * When timer starts, the object performs the method shown above....move left!! **

End Class

Public Class Greenie
 * ADDING PICTURES!!!!!!**

Public pbxMonster As New PictureBox Public strName As String **Identifying the new picture.** Public Sub New Dim rndRand As New Random **Declaring a new random location for the picture to appear.** pbxMonster.Location = New Point(rndRand.Next(0, Spawn.Width), rndRand.Next(0, Spawn.Height)) **Identifying the location of the image on the screen.** pbxMonster.SizeMode = PictureBoxSizeMode.StretchImage **Identifying the size of the image on the screen.** End Sub End Class

Public Class Spawn
 * MORE SPECIFICATIONS OF CHARACTERISTICS OF THE IMAGE ON THE SCREEN!!!!!!!!!**

Private Sub cmdGreenie_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdGreenie.Click Dim objGr As New Greenie

' MsgBox(My.Application.Info.DirectoryPath & "\greenie.gif") objGr.pbxMonster.Image = Image.FromFile(My.Application.Info.DirectoryPath & "\greenie.gif") objGr.pbxMonster.Width = 20 objGr.pbxMonster.Height = 20 objGr.strName = "Greenie"

Me .Controls.Add(objGr.pbxMonster) End Sub

Private Sub cmdBlue_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdBlue.Click Dim objGr As New Blue(300)

' MsgBox(My.Application.Info.DirectoryPath & "\greenie.gif") objGr.pbxMonster.Image = Image.FromFile( My .Application.Info.DirectoryPath & "\blue.jpg" ) objGr.pbxMonster.Width = 40 objGr.pbxMonster.Height = 40 objGr.intSpeed = 20 objGr.strName = "Bluey"

Me .Controls.Add(objGr.pbxMonster)

End Sub

Private Sub cmdRed_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdRed.Click Dim objGr As New Red(40)

'MsgBox(My.Application.Info.DirectoryPath & "\greenie.gif") objGr.pbxMonster.Image = Image.FromFile( My .Application.Info.DirectoryPath & "\red.jpeg" ) objGr.pbxMonster.Width = 80 objGr.pbxMonster.Height = 80 objGr.intSpeed = 40 objGr.strName = "Redopolis"

Me .Controls.Add(objGr.pbxMonster) End Sub End Class

**This is a way of getting lists of an object and putting them on the screen!**

Public Class Form1 Dim lstWalls As New List( Of Label) Private Sub Form1_Load( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase .Load For x = 1 To 5 lstWalls.Add( New Label) lstWalls(x - 1).BackColor = Color.MediumVioletRed lstWalls(x - 1).Location = New Point(0, 30 * x) Me .Controls.Add(lstWalls(x - 1)) Next End Sub End Class