¿Cómo encontrar cadenas en texto en VB?
Generalmente se usa más en la programación de bases de datos.
Primero, necesitas convertir los caracteres chinos en códigos pinyin.
Por ejemplo: WMZ modificado por Wang Mazi
Función de conversión
Función privada GetPY(ByVal strparameter As String) como cadena
Dim intTmp es Cadena, I es Largo
Para i = 1 a Len(strparameter)
int tmp = Asc(Mid(str parámetro, I, 1))
Si intTmp & ltAsc("ah") entonces
GetPY = GetPY & amp "*"
ElseIf intTmp & gt= Asc ("ah ") e int tmp
GetPY = GetPY & amp" A "
ElseIf intTmp & gt= Asc ("Ba ") e int tmp
GetPY = GetPY & amp" B "
ElseIf intTmp & gt= Asc ("wipe ") e int tmp
GetPY = GetPY & amp" C "
ElseIf intTmp & gt= Asc ( "tomar ") e int tmp < Asc ("polilla ") entonces
GetPY = GetPY & amp" D "
ElseIf intTmp & gt= Asc ("polilla ") e int tmp < Asc ("cabello") entonces
GetPY = GetPY & amp" E "
ElseIf intTmp & gt= Asc ("cabello") y int tmp
GetPY = GetPY & amp" F "
De lo contrario, si intTmp & gt= Asc ("Ga ") e int tmp < Asc ("ha ") entonces
GetPY = GetPY & amp" G "
ElseIf intTmp & gt= Asc ("Ha ") y int tmp
GetPY = GetPY & amp" H "
ElseIf intTmp & gt= Asc ("strike ") y int tmp
GetPY = GetPY & amp" J "
ElseIf intTmp & gt= Asc ("Ka ") y int tmp < Asc ( "la ") entonces
GetPY = GetPY & amp" K "
ElseIf intTmp & gt= Asc ("La ") and int tmp < Asc ("mamá") entonces
GetPY = GetPY & amp" L "
ElseIf intTmp & gt= Asc ("Mamá ") e int tmp
GetPY = GetPY & amp" M "
ElseIf intTmp & gt= Asc ("tomar ") e int tmp
GetPY = GetPY & amp" N "
ElseIf intTmp & gt= Asc ( "Oh ") y int tmp
GetPY = GetPY & amp "Oh"
ElseIf intTmp & gt= Asc ("pa") y int tmp < Asc ("punto") Entonces
GetPY = Ge
tPY & amp" P "
ElseIf intTmp & gt= Asc("Periodo") y int tmp
GetPY = GetPY & amp"ask"
ElseIf intTmp & gt= Asc ("ran ") y int tmp
GetPY = GetPY & amp" R "
ElseIf intTmp & gt= Asc ("scatter") y int tmp
GetPY = GetPY & amp" S "
ElseIf intTmp & gt= Asc ("collapse ") e int tmp < Asc ("dig ") entonces
GetPY = GetPY & amp" T "
ElseIf intTmp & gt= Asc ("dig ") e int tmp
GetPY = GetPY & amp" W "
ElseIf intTmp & gt= Asc("pasado") y int tmp
GetPY = GetPY & amp" X "
ElseIf intTmp & gt= Asc("presión") y int tmp
GetPY = GetPY & amp" Y "
ElseIf intTmp & gt= Asc ("giro") e int tmp
GetPY = GetPY & amp " Z"
de lo contrario, si (int tmp & gt; = 65 e intTmp & lt= 91) o (intTmp & gt= 97 e intTmp & lt= 123), entonces
GetPY = GetPY & ampmid(strparameter, I, 1)
Otros
GetPY = GetPY & amp"*"
Terminará si...
Entonces
Finalizar función
En cuanto a mostrar la búsqueda en TEXT2, no sé qué formato tiene su fuente de datos y no puedo escribírselo. .