ciao a tutti...
sembra una stupidata.,.. ma nn sono riuscito a capire come si fa....
tramite una funzione estraggo un stringa....
codice:
Public Function GetDates(ByVal FileName As String, ByVal Data1 As String) As Generic.List(Of String)
Dim RetValue As New Generic.List(Of String)
Dim stringhe As String
Dim f As New Form1
Dim Lines() As String = My.Computer.FileSystem.ReadAllText(FileName).Split(Environment.NewLine)
For Each s As String In Lines
Try
If s.Contains("Music Start: " & Data1) Then
s.StartsWith("Channel")
stringhe = (s)
If Not RetValue.Contains(stringhe) Then
RetValue.Add(stringhe)
End If
Else
End If
Catch ex As Exception
End Try
Next
Return RetValue
End Function
in output ho una cosa del genere...
COME FACCIO NELLA TEXTBOX A MANDARE IL TESTO A CAPO
DOVE INIZIA LA PAROLA "channel"?
grazie
l'output è un txtbox multiline
For Each s As String In GetDates(Filename, Data1)
With txtPdf
.Multiline = True
.AppendText(s)
End With
Next
codice:
Channel 1 - Music Start: 29.01.07 14:38:54 C:\Video\YCD\(Monxx) Robbie Williams - Advertising Space.mpg (UID:)Channel 1 - Music Start: 29.01.07 15:14:03 C:\Video\YCD\(Monxx) Robbie Williams - Advertising Space.mpg (UID:)
Channel 1 - Music Start: 29.01.07 15:18:20 C:\Video\YCD\(Video) Robbie Williams - Feel.mpg (UID:)Channel 1 - Music Start: 29.01.07 15:22:23 C:\Video\YCD\CliP Mylo Vs Miami Sound Machine - Drop The Pressure Vs Doctor Beat.avi (UID:)Channel 1 - Music Start: 29.01.07 15:26:17 C:\Video\YCD\Coldplay - Talk.mpg (UID:)Channel 1 - Music Start: 29.01.07 15:30:59 C:\Video\YCD\Coldplay - The Scientist.mpeg (UID:)Channel 1 - Music Start: 29.01.07 15:35:06 C:\Video\YCD\Coldplay - Trouble.mpg (UID:)Channel 1 - Music Start: 29.01.07 15:39:18 C:\Video\YCD\Coldplay- Speed of sound.mpg (UID:)
Channel 1 - Music Start: 29.01.07 15:43:30 C:\Video\YCD\Depeche Mode - Strange love.mpg (UID:)Channel 1 - Music Start: 29.01.07 15:47:02 C:\Video\YCD\Kylie Minogue - Cant Get You Out of My Head.mpg (UID:)Channel 1 - Music Start: 29.01.07 16:34:27 C:\Video\YCD\(Monxx) Robbie Williams - Advertising Space.mpg (UID:)