Fórum No modo debug não está lendo o IF #618517
05/08/2022
0
Estou fazendo um curso onde estou na parte da tela de item
bom... estou com problema que na hora que rodo o programa ele está literalmente pulando o IF
if not (CharInSet(Key,['0'..'9',#8])) then
key :=#0;
if key=#13 then Ele pula e vai para o end;
begin
qryCod.Close;
qryCod.Params[0].AsInteger:=StrToInt(edCod.Text);
qryCod.Open;
end;
alguém poderia me ajudar?, desde já ficarei grato :)
João
Curtir tópico
+ 1Post mais votado
09/08/2022
O código teria que ficar assim.
if key = #13 then
begin
ShowMessage('Enter Pressionado');
end;
if not (CharInSet(Key,['0'..'9',#8])) then
begin
key :=#0;
end;Lucas Santato
Gostei + 1
Mais Posts
10/09/2022
João
O código teria que ficar assim.
if key = #13 then
begin
ShowMessage('Enter Pressionado');
end;
if not (CharInSet(Key,['0'..'9',#8])) then
begin
key :=#0;
end;Ok, irei tentar aqui muito obrigado!!!
Gostei + 1
09/10/2022
João
O código teria que ficar assim.
if key = #13 then
begin
ShowMessage('Enter Pressionado');
end;
if not (CharInSet(Key,['0'..'9',#8])) then
begin
key :=#0;
end;Beleza cara, valeu, irei tentar aqui
Gostei + 1
Clique aqui para fazer login e interagir na Comunidade :)