Recorrer Una Cadena [SOLUCIONADO]


Subject: Recorrer Una Cadena [SOLUCIONADO]
como puedo saber si una cadena de un textbox contiene la @.

cuando pulso un boton no cuando escribo.

lo intente con mid$ pero no llego.

gracias

Subject: Re: Recorrer Una Cadena
Buenas lo podes hacer con la función InStr ejemplo:

InStr("tru3n3x@gmail.com", "@") = True
InStr("tru3n3xgmail.com", "@") = False

lo combinas con , por ejemplo , un condicional IF y listo

con un textbox no cambia mucho te dejo un ejemplo con un condicional:

IF (InStr(TextBox1.Text, "@")) THEN
Message("Si, tiene @")
ELSE
Message("No, no tiene @")
ENDIF


Saludos

Last edited by TrueneX on Wednesday, 19 May 2010, 22:40; edited 1 time in total
Profile PM  
Subject: Re: Recorrer Una Cadena
Me fue perfecto. MUCHAS GRACIAS!

Interesante el inStr.

Ayortano
Subject: Re: Recorrer Una Cadena [SOLUCIONADO]
Perdón por llegar tarde, pero la función LIKE no sirve??

textbox.text LIKE "JFHGIURHIG" devuelve un boolean...

Last edited by Guest on Wednesday, 26 May 2010, 01:06; edited 1 time in total

Page 1 of 1


  
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events

   

This is a "Lo-Fi" version of our main content. To view the full version with more information, formatting and images, please click here.

Powered by Icy Phoenix based on phpBB
Design by DiDiDaDo

Generation Time: 0.2893s (PHP: -72% SQL: 172%)
SQL queries: 25 - Debug Off - GZIP Enabled