Setup: A form with a text box, a button, and a list box. The list box has ~10 values that are added to it when the form loads.
I’m wondering if it is possible to write the code for the button so that, when pressed by the user, it would add whatever text is in the text box to the list box and change the code of the form load to add that text to the pre-existing listbox.items.add’s that are in the code of the form load.
From my comment:
and as you commented:
Yes, that is a viable solution.
If using files, make sure to use the
Environment.GetFolderPath(...)as the path location. You should almost never use your executable’s path for storage location.