Bon et bien voila j'ai fait un editeur de texte avec une TextBox et
divers fonctions notamment la fonction find et findnext
qui suit:
Private Sub mnuSearchFind_Click() Dim lngPos As Long m_strSearch = InputBox("Entrez le mot a rechercher.", "Find Text") If m_strSearch = "" Then Exit Sub lngPos = InStr(1, txtData.Text, m_strSearch, vbTextCompare) If lngPos > 0 Then txtData.SelStart = lngPos - 1 txtData.SelLength = Len(m_strSearch) Else m_strSearch = "" MsgBox "Aucun mot dans le document.", vbExclamation End If End Sub
|
je souhaite maintenant remplacer le surlignement:
txtData.SelStart = lngPos - 1 txtData.SelLength = Len(m_strSearch)
|
par une copie du reste de la ligne le mot trouvé compris dans une autre textbox
mais je n'arrive pas a voir!!!
si quelqu'un pouvez m'aider
Merci d'avance