Actually, Iam developing a game,
Iam using threading concept to display some balls going around the screen randomly. I displayed a gun image on the screen too.
Now want to shoot those balls by moving the mouse on the screen. so for this I need to move the picturebox, which I have already created.
so I tried to create picture boxes during runtime, when ever I press the mouse button down and set the location of the picture box to the mouse positions.
so thats why I need to create the picturebox control during runtime and assign the location.
so I wrote the following, but could not display anything.
Is the below way correct or is there any other way.
Private Sub Form1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles MyBase.MouseDown
Dim pic As New System.Windows.Forms.PictureBox()
Dim resources As System.Resources.ResourceManager = new System.Resources.ResourceManager(GetType(Form1))
pic.Location = New System.Drawing.Point(e.X, e.Y)
pic.Size = New System.Drawing.Size(104, 80)
pic.Image = CType(resources.GetObject("j:\shooter.jpg"),_ System.Drawing.Bitmap)
pic.Visible = True
End Sub