mardi 19 septembre 2017

Need help randomizing a list and posting it as a position on my form

I'm a high school student trying to learn VB.Net programming. I've been trying to get a whack-a-mole game going. I have been trying to make a list of positions for a button, and somehow retrieving the integers and posting it as a position on my app. I've been experimenting with random number generators but I can't catch how to retrieve numbers off a list and exchanging them into positions. Here's the code:

Public Class Form1
    Dim red, blue, green, yellow
    Dim ListX As New List(Of Integer)
    Dim ListY As New List(Of Integer)(New Integer() {400, 350})
    Private Sub btnstart_Click(sender As Object, e As EventArgs) Handles btnstart.Click
        For pos = 1 To 7
            PictureBox3.Location = New Point(73, 398)
        Next pos
    End Sub
    Sub Main()
        Dim ListX As New List(Of Integer)
        Dim ListY As New List(Of Integer)(New Integer() {400, 350})
    End Sub
    Private Sub PictureBox3_Click(sender As Object, e As EventArgs) Handles PictureBox3.Click

    End Sub




Aucun commentaire:

Enregistrer un commentaire