OdeJong, i don't know what you want, i can only guess...
In your previous post i gave you the solution. Take a look at modified code:
Dim sFileName As String = String.Empty, sLine As String = String.Empty, sCols() As String = Nothing
Dim objReader As System.IO.StreamReader = Nothing, sb As System.Text.StringBuilder = Nothing
Try
sFileName = "F:\myCard.vcf"
sb = New System.Text.StringBuilder
Me.Text = sFileName
objReader = New System.IO.StreamReader(sFileName)
Do While objReader.Peek >= 1
sLine = objReader.ReadLine()
sCols = sLine.Split(":")
Select Case UCase(sCols(0))
Case "BEGIN", "END", "VERSION"
GoTo SkipNext
Case "N"
sb.Append("Name = " & sCols(1))
Case "FN"
sb.Append("FName = " & sCols(1))
Case Else
sb.Append(sCols(1))
End Select
sb.Append(sCols(1) & vbCrLf)
SkipNext:
Loop
objReader.Close()
Me.TextBox1.Text = sb.ToString
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Exclamation, "Error...")
Finally
objReader.Dispose()
sb = Nothing
End Try
Probably, you want to read each value of field (
N
,
FN
,
TEL
and others) into different textboxes. In the above example, i'll show how to display the content of vCard in the multiline textbox.
I hope, it helps.