probleme avec mon code vb.net

probleme avec mon code vb.net - VB/VBA/VBS - Programmation

Marsh Posté le 31-05-2005 à 21:47:37    

bonjour cher amis j'ai un programme en vb qui permet de faire la recherche c'est a dire qu'on enregistre de nonmbreux courriels ensuite pour aller vite on peut faire la recherche avec juste les premiers mots du courriel voulu. Mon probleme est que qd je fais la recherche il trouve le bon courriel mais ne se déplace pas sur ce dernier il faut dérouler tout le scroll bar pour voir lequel qui a été cocher. conclusion cette recherche sert a rien comment faire pour que qd il le trouve qu'il se place directement la dessus merci  
Private Sub Picture1_Click()
    If txtContact.Text <> "" Then
        Dim intContact As Long
        Dim intContact2 As Long
        intContact = intEndRech
        intContact2 = intEndRech2
        intContact = 1
        For Each ObjLstItm In LstContact.ListItems
             
            If InStr(1, UCase(ObjLstItm.Text), UCase(txtContact.Text)) > 0 And intContact >= intEndRech Then
                LstContact.Refresh
                ObjLstItm.Checked = True
                LstContact.SetFocus
                intEndRech = intContact + 1
                Exit Sub
            End If
            intContact = intContact + 1
        Next
       
         For Each ObjLstItm In lstcontacttrans.ListItems
             
            If InStr(1, UCase(ObjLstItm.Text), UCase(txtContact.Text)) > 0 And intContact2 >= intEndRech2 Then
                LstContact.Refresh
                ObjLstItm.Checked = True
                lstcontacttrans.SetFocus
                intEndRech2 = intContact2 + 1
                Exit Sub
            End If
            intContact2 = intContact2 + 1
        Next
        MsgBox C_MESSAGE_RECHERCHE_CONTACT_INEXISTANT
        intEndRech = 0
        intEndRech2 = 0
    End If
End Sub  
NB : voila le code

Reply

Marsh Posté le 31-05-2005 à 21:47:37   

Reply

Sujets relatifs:

Leave a Replay

Make sure you enter the(*)required information where indicate.HTML code is not allowed