30-11-16, 11:31 AM
(29-11-16, 03:53 PM)lmofallis كتب : وعليكم السلام ورحمة الله وبركاته،
جرب إضافة خاصية FileMode.Append إلى السطر الأول.
أي، هذا السطر:
PHP كود :
Dim swWriter As New System.IO.StreamWriter(My.Application.Info.DirectoryPath & "\logs.bk")
يصبح هكذا:
PHP كود :
Dim swWriter As New System.IO.StreamWriter(My.Application.Info.DirectoryPath & "\logs.bk", FileMode.Append, FileAccess.Write)
بارك الله فيك شكرا نفع معاي شكرا
(29-11-16, 08:18 PM)amgad525 كتب :PHP كود :
Dim sb As New System.Text.StringBuilder
For Each r As DataGridViewRow In DataGridView4.Rows
If r.Index = DataGridView4.Rows.Count - 1 Then Exit For
Dim q = From x As DataGridViewCell In r.Cells Select x.Value
sb.AppendLine(String.Join(",", q))
Next
IO.File.AppendAllText(My.Application.Info.DirectoryPath & "\logs.bk", sb.ToString)
شكرا استاذ amgad525
جربته ومشه معاي شكرا بارك الله فيج

