3
Reply

How to Update a Listbox on Another Form?

AB

AB

Feb 19 2006 7:10 PM
3k
Hello. I have a Listbox, listBoxA (say), on FormA. Now, there are two other Forms, FormB and FormC, with textboxes textBoxB and textBoxC. The items in listBoxA are added to via textBoxB and textBoxC; either textbox can add an item. Can this be done? How can this be done? Here's what I could come up with: Write item from either textbox to a textfile and read the items from the textfile for the listbox. It works but if FormA (with the listbox) is open, I must close it and re-open to see new item(s). Anyone know of a better way, especially where I don't have to re-open the Form with the listbox? This is in C#. Thanks!

Answers (3)