954,551 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

I have a question

I'm just learning VB with the 2008 express edition.
I'm trying to create a program that uses 3 list boxes. The first contains a list of products. After a search is preformed the second list box displays the products found. This is pretty simple, basic array stuff. My problem is moving items from the second list box into a third list box to purchase the product. I think I need to change the index numbers of the stuff I move into list box 3 because when I preform calculations with the stuff in list box 3, it seems to answer like its using the index numbers in list box1. So, how do you change the index numbers when you change list boxes?

clair0917
Newbie Poster
3 posts since Apr 2010
Reputation Points: 10
Solved Threads: 1
 

You question should have been posted in vb.net section of the forum.

Does your application connects to any database for the list of items ?

debasisdas
Posting Genius
6,872 posts since Feb 2007
Reputation Points: 666
Solved Threads: 434
 

Hi,
Suppose you have a listbox named 'lsbProducts', another one that is called 'lsbPurchased' and a button named 'btnTransfer'. In order to "transfer" item between the listboxes, you need to write the code below..

On button Click:

Dim temp as ListItem = lsbProducts.SelectedItem
 lsbPurchased.Items.Add(temp)

I hope that this is what you want...

Cheers :D

Alexpap
Junior Poster
121 posts since Sep 2008
Reputation Points: 11
Solved Threads: 13
 

You question should have been posted in vb.net section of the forum.

Does your application connects to any database for the list of items ?


The items are added with text boxes and buttons and saved into a data file with a steam writer

clair0917
Newbie Poster
3 posts since Apr 2010
Reputation Points: 10
Solved Threads: 1
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: