Click here to Skip to main content
15,898,222 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
CONTEXT: Basically I need to take the contents of a TextBox and assign it to my ListBox. The drawback is the two controls are in forms (windows) different.

The TextBox control is in the form 1 and the ListBox is in the form 2.

Now every time you write something in my TextBox (window1) I want the same content appears on a line of my ListBox (window2).

Every time I type something in the textbox, should be assigned to a new line in the ListBox so completely fill line by line.

SOME DETAILS: The form1, also contains a ListView, which has a column that is filled with the same TextBox that will be assigned to my ListBox in form2.

I would like some sugeriencias from you.

The application is developed in VB.Net, WPF application.

Some example or code?
many Thanks
Posted

1 solution

You can call the windows forum that you need to add to from any forum by just calling its name.

Example Called From Main
Forum2.ListBox1.Add("ABC")

Example Called From Second Forum
Forum1.ListBox1.Add("ABC")
 
Share this answer
 
Comments
Maciej Los 24-Jul-13 14:43pm    
Are you sure this is correct answer?
alonetmr 24-Jul-13 15:18pm    
This solution doesn't work.
Thanks
Maciej Los 24-Jul-13 16:33pm    
Have a look here:
Doing Async the Easy Way[^]
How to use BackgroundWorker to update UI in WPF[^]
and tell me if something is useful for you ;)
[no name] 24-Jul-13 19:30pm    
this does work I just tested it by adding items to a list box from a button from a different forum.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900