//create save file dialog
SaveFileDialog fileChooser = new SaveFileDialog();
try
{
fileChooser.Filter = ("Text Document|*.txt|All Files|*.*");
fileChooser.ShowDialog();
fileWriter = new StreamWriter(fileChooser.FileName);
for (int I = 0; I < listBox1.Items.Count; I++)
{
fileWriter.WriteLine(Convert.ToString(listBox1.Items[I]));
}
fileWriter.Close();
}
catch (Exception ex)
{
MessageBox.Show(Convert.ToString(ex.Message));
return;
}
}
what it is doing is saving the text in the listbox but not the rest of the data inputted. I've attached what I have done now so you could get a better feel/look on whats happening.
Attached File(s)
-
FinalProject.zip (72.01K)
Number of downloads: 42

New Topic/Question
Reply




MultiQuote





|