English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

hi , i have two forms in my program , i have text box in one of the form and list box in the other form i want to transfer information between text box and list box, between forms , can anyone please tell me the codes

thank you

2006-12-20 10:41:36 · 5 answers · asked by Anonymous in Computers & Internet Programming & Design

5 answers

Check out http://www.pscode.com for examples. You never mentioned which version of VB you were using - .NET or previous.

If you are using VB 6 and the intrinsic listbox, you can simply execute the AddItem method of the listbox.

List = List1.AddItem("Tennessee", 23)

The AddItem method of the intrinsic Listbox has two arguments it takes - the item to be added, and the index (place number) where it should be sorted into the list.

2006-12-20 10:55:56 · answer #1 · answered by Richard H 7 · 0 0

I know more C++ than VB, so if you add a C++ SDK to VB then maybe I can help. What do you mean by "transfer data"? Do you mean trans vars or allocating mem?

2006-12-20 10:44:38 · answer #2 · answered by Anonymous · 0 0

Simply assign the values from one form to the other, i.e.

frmTwo.txtTextBox.Text = frmOne.lbListBox1.List(iItem)

2006-12-20 10:55:42 · answer #3 · answered by Anonymous · 0 0

Form2.Text1.Text = Form1.List1.Text

2016-05-23 02:08:34 · answer #4 · answered by Ann 4 · 0 0

Go to www.programmersheaven.com for some detailed help.

2006-12-20 10:45:16 · answer #5 · answered by micaso1971 5 · 0 0

fedest.com, questions and answers