Búsqueda de datos de un archivo txt con datagridview
Necesito de su ayuda estoy usando visual studio: tengo un proyecto con 2 textbox y un datagridview uno para introducir el nombre y el otro para el apellido,, el propósito es que cuando yo introduzca datos en los textbox y de clic en el botón ejecutar me muestre los datos del: nombre en el datagridview que esta contenido en el archivo txt
Pero no funciona cuando yo pongo todo en minúscula o mayúscula,, para que los resultados den tengo que escribirlo como lo guarde el nombre y apellido,, el Lic. De la clase me dijo que usara funciones de cadena pero no avanzo en nada
Otro detalle es el conteo por ejemplo yo para "nombre le asigne: 15,, apellido: 15,, dirección: 30,, tele: 8,, cel:8,, fechanacimiento: 10 estoy fallando en ello creo
Sinceramente necesito de su ayuda le paso el código:
Imports System. IO
Public Class Buscar
    Dim nombre, apellido, direcion As String
    Dim tele, cel, fecha As String
    Dim agenda As String
    Private Sub btn_buscar_Click(sender As Object, e As EventArgs) Handles btn_buscar.Click
        Try
            Dim sr As New StreamReader("c:\agenda\contactos.txt")
            While sr.Peek <> -1
                agenda = sr.ReadLine
                txt_nombre.Text = UCase(txt_nombre.Text)
                txt_apellido.Text = UCase(txt_apellido.Text)
                agenda = UCase(agenda)
                txt_nombre.Text = LCase(txt_nombre.Text)
                txt_apellido.Text = LCase(txt_apellido.Text)
                agenda = LCase(agenda)
                If agenda.Contains(txt_nombre.Text) And agenda.Contains(txt_apellido.Text) Then
                    nombre = agenda.Substring(0, 15)
                    apellido = agenda.Substring(15, 15)
                    direcion = agenda.Substring(30, 30)
                    tele = agenda.Substring(60, 11)         '60 11
                    cel = agenda.Substring(71, 9)           '71, 9
                    fecha = agenda.Substring(80, 10)        ' 80 10
                    '
                    dg.Rows.Add(nombre, apellido, direcion, tele, cel, fecha)
                End If
            End While
            sr.Close()
        Catch ex As Exception
            MsgBox("Error:" + ex.Message)
        End Try
    End Sub


