Array or Loop for Project

dlicon

New member
Joined
Apr 21, 2007
Messages
2
Location
Fresno, Ca
Programming Experience
Beginner
Thank you ahead for taking the time to look at this.

I'm hoping to enter a word in a textbox on form (vb.net). After a button click, the code would search a list of possible answers with an value attached. The lowest answer/value would be displayed by message box.
By pressing the OK button on the messagebox, this would add +1 to the value.
For example, if I entered dog in the textbox and the possible answers were Lab-1, Boxer-2, Chow-3, the message box would return Lab-1 because the value of 1 was the lowest. Once the OK button on the messagebox was clicked the value would change to Lab-2.
 
A better explaination

1. A user enters a limited search critiera on a Windows form textbox created in VB.net. For example, the criteria can only be "dog" or "cat"

2. A search button on the form triggers the On_Click code. The code I'm looking for would determine either "dog" or "cat" in the textbox.

3. Once the determination was made, the code would search a list (array?) for the possible answer. The answer needs to be the lowest value of either determination. For example, if "dog" was entered, the only answers available would be Lab, Boxer or Chow

Each answer would have a random value

Lab = 1
Boxer = 2
Chow = 3

base on the lowest value (1), Lab would be the answer. Same if "cat" was entered. The ony possible answer would be Tabby,Persian,Alley. They would also have values

Tabby = 1
Persian = 2
Alley = 3

4. A message box would display the answer (Lab) because of its value(1). Once the OK button on the messagebox was clicked the value of the answer would increase by 1 (Lab = 2). So when the next time the program is run the answer(elements??) would have these values.

Lab = 2
Boxer = 2
Chow = 3

I hope this is a better explaination. thx again
 
so something like this:
VB.NET:
Private Sub Button1_Click (...) Handles Button1.Click
  Select Case Textbox1.Text.ToLower
    Case "cat"
      'Code here for array search under cat
    Case "dog"
      'Code here for array search under dog
   End Select
End Sub
to start?

I'm not sure how to help you unless you provide the code that actually handles the array(s)
 
Back
Top