So what I'm looking into doing is be able to add items into a listbox (which is easy), and when the user selects an item, depending on the item, it'll update labels which are on the same form as the listbox(not sure how to do), and then the user can "use" the item they've selected, and it's removed from the listbox, UNLESS there are multiple of them.
An analogy to make this easier to visualize would be this:
There are two forms, frmMain and frmInventory (where the list box and labels are located).
In frmMain, the user gains a potion (in this case, let's say three potions, kill two birds with one stone).
Now we can add it to the list box by using:
frmInventory.wepList.Items.Add("Small Potion (3)")
and so now in the list box, all there is is just "Small Potion (3)".
When the user selects the item, on the right of the list box are two labels, lblName and lblEffect.
It'll update lblName to "Small Potion" and lblEffect to "HP Recovery + 50".
Below these two labels is a button, which has the text "Use Item" on it.
When that button is clicked, it will execute a command associated with the item (little confused on how to do this part) along with change the name in the list box to "Small Potion (2)".
I could change it so it just says "Small Potion" in the list box, and have a label to indicate numbers, and have a If/Else command. For example:
If lblNumber = 0 Then frmInventory.wepList.Items.Remove("Small Potion") Else lblNumber -= 1 End If
So, in the end, this is what I am asking help for.
How do I make it so when the user selects a item, it'll update execute code for that item, how can I store a number associated with a item in the list box (along with any values associated with that item).
When user selects an item in the list box, how do I activate an event/code that is associated for that item?
How do I store values for a specific item in the list box?
Thank for the help, and if you have any questions, please ask them!
As for source code, there is none written yet to be of any value for this, sorry!