hola amigos buen dia!!
me pasa lo siguiente....
bueno antes que nada uso delphi 5 enterprise
quiero hacer una funcion para validar las teclas
Código Delphi
[-]function oprime(tecla:char; edit :Tcomponent):char; var punto:boolean; size:integer; texto:string; letra: char; blanco : Boolean; begin size := 0; punto:=false; texto:= tedit(edit).text; if (tecla in['0','1','6'..'9',#8,'.']) then begin if (tecla = '0') and (size = 0 ) then begin Result := #0; end; if tecla = '0'then begin Result := #0; end; if (tecla = '.') and (size <> 1) then begin Result := #0; end else begin Result := tecla; tedit(edit).MaxLength := 3; end; if (tecla > '6') and (tecla < '9') and (size < 1) then begin Result := tecla; tedit(edit).MaxLength := 2; end; cantidad := cantidad + Result; size:= length(trim(cantidad)); end; end;
aun no la termino...
lo que pasa es que al momento de compilar me ignora algunas lineas de codigo!!
=( ya ven que cuando compilas te pone un puntito de color azul en la parte izquierda y a mi me lo pone en algunas lineas y en otras no; asi como lo tengo si compila perfectamente pero aun no he terminado la funcion y nadamas agrego algunas lineas mas y es cuando me empieza a ignorar el result...
que hago???
por favor ayudenme estoy desesperdo!! hasta ya formatie mi pc pensando que era problemas de virus o spyware y pasa lo mismo