Public Class Form1 Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load Dim pos As Integer = -1 Dim start As Integer = 1 Dim stringa As String = "gongolo mammolo cucciolo eolo dotto pisolo brontolo" Dim stringhetta As String = " " While pos <> 0 If pos <> -1 Then Debug.Print(pos) pos = InStr(start, stringa, stringhetta) start = pos + 1 End While End Sub End ClassRisultato:
8 16 25 30 36 43Ma non è ancora raggiunto lo scopo: vuole che la parola venga colorata durante la digitazione se viene riconosciuta come una particolare parola.
Intanto, deve usare una richTextBox, se ricordo bene... e poi... vedremo.
Nessun commento:
Posta un commento