Hallo,
soweit bin ich gekommen, das Programm startet ohne Fehlermeldungen, fügt die Pfade ein (wahrscheinlich), es ist aber kein Text sichtbar, nur wenn man in die Listbox klickt, sieht man das ein "Platz" verwendet wird.
C#-Quelltext
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16:
| public void button1_Click_1(object sender, EventArgs e) { string Pfad = string.Empty;
OpenFileDialog openFileDialog1 = new OpenFileDialog(); openFileDialog1.Multiselect = true;
if (openFileDialog1.ShowDialog() == DialogResult.OK)
foreach (string Pfad in openFileDialog1.FileNames) { _items.Add(Pfad); listBox1.DataSource = null; listBox1.DataSource = _items; } } |