• 0

[vbnet] Problem here...


Question

Ok, I am making a petshop program. Now, I have it set up, so, the pet shop owner can add a pet. I have everything ok, allowing him to enter Species, name, etc, and everything to change accordingly. Now, I have my pet's PLAY function like this:

'overridden play function
        Overrides Function Play() As String
            Console.WriteLine("Cat.Play")
            Return Name & " attacks the yarn ball"
        End Function

****

Private Sub button2_click(ByVal sender As System.Object, _
    ByVal e As System.EventArgs) Handles Button2.Click

'Here is where it displays how the animal plays,
'according to what is selected in the Listbox
        
MsgBox(petarray(ListBox1.SelectedIndex).Play)

Now, I want to make it so when the PetShop owner enters how the animal plays, when the user clicks the new animal, The form is set out like this:

input = InputBox("Ok, let's add a new pet! Please input the animal type:")
        ListBox1.Items.Add(input)
        TextBox2.Text = input
        Name = InputBox("Thanks! Now, please provide the name of the animal.")
        TextBox1.Text = Name
        input = InputBox("Please enter the breed of the animal:")
        TextBox3.Text = input
        input = InputBox("Please enter the Gender of the animal:")
        TextBox4.Text = input
        input = InputBox("Please enter the Color of the animal:")
        TextBox5.Text = input
        input = InputBox("Please enter the number of legs the animal has:")
        TextBox6.Text = input
        input = InputBox("Please enter the cost of the animal:")
        TextBox7.Text = input
        input = InputBox("Please enter the food the animal eats:")
        TextBox8.Text = input
        play = InputBox("Please enter a few words describing how your animal plays:")

Anyone?

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.