14-12-12, 08:40 PM
كود :
Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
Dim Arr(ComboBox1.Items.Count - 1) As String
ComboBox1.Items.CopyTo(Arr, 0)
IO.File.WriteAllLines("Data.txt", Arr)
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If My.Computer.FileSystem.FileExists("Data.txt") Then
ComboBox1.Items.AddRange(IO.File.ReadAllLines("Data.txt"))
End If
End Subبالتوفيق
[SIZE=6]لا إله إلا أنت سبحانك إني كنت من [/SIZE][SIZE=6]الظالمين[/SIZE][SIZE=6]
[/SIZE]
[/SIZE]
