Oppure

Loading
Questo topic e' stato chiuso dal moderatore.
10/12/08 21:36
Claudio
...ennesima domanda! Ho in una listbox una serie di dati che devo salavare in un file....Come devo fare?
aaa
11/12/08 12:37
I)eathBringer
    Private Sub SaveButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SaveButton.Click
        Dim save As New SaveFileDialog
        save.Filter = "File di testo|*.txt"
        If save.ShowDialog = Windows.Forms.DialogResult.OK Then
            Dim writer As New IO.StreamWriter(save.FileName)
            For i As Integer = 0 To ListBox1.Items.Count - 1
                writer.WriteLine(ListBox1.Items.Item(i))
            Next
            writer.Close()
        End If
    End Sub
Ultima modifica effettuata da I)eathBringer 11/12/08 12:40
aaa
15/12/08 17:31
Claudio
Grazie!
aaa