So in my program i am trying to make it so that when you press a button it opens a “choose file” popup(where the user can choose a text file) then after the user chooses it the program will automatically load each line of the textfile into a listbox.
But i have been researching it and the only thing i have been able to find is a file>open thing. So how cold i make it open a “open” dialogue on the press of a button
and since i haven’t been able to find anything on the open dialogue i haven’t looked for anything on the loading each line of it into a listbox, so if anyone wants ot help me with that it would be great.
and i do not have any code to show you as the rest of my program has no relevance to this
EDIT: Answer on the comment:
If you can use LINQ, then its a one row of code to read all lines from the listbox and write it to a file:
Save using SaveFileDialog and LINQ
If you can’t use LINQ, then you can do this instead:
Save using SaveFileDialog and FOR/EACH