Fórum Missing operator or semicolon #612755
08/09/2020
0
Estou com este problema:
Missing operator or semicolon
Aqui está meu código:
Missing operator or semicolon
Aqui está meu código:
procedure TfrmClientes.txtBuscaKeyPress(Sender: TObject; var Key: Char);
begin
if ((Key in ['0'..'9'] = False) (word (Key) <> VK_BACK)) then
begin
ShowMessage('Só é permitido a pesquisa com numeros!');
Key := #0;
end;
end;
Guilherme Discher
Curtir tópico
+ 0
Responder
Post mais votado
09/09/2020
procedure TfrmClientes.txtBuscaKeyPress(Sender: TObject; var Key: Char);
begin
if (not CharInSet(Key,['0'..'9']) and (ord(Key) <> VK_BACK)) then
begin
ShowMessage('Só é permitido a pesquisa com numeros!');
Key := #0;
end;
end;Emerson Nascimento
Responder
Gostei + 1
Mais Posts
09/09/2020
Guilherme Discher
procedure TfrmClientes.txtBuscaKeyPress(Sender: TObject; var Key: Char);
begin
if (not CharInSet(Key,['0'..'9']) and (ord(Key) <> VK_BACK)) then
begin
ShowMessage('Só é permitido a pesquisa com numeros!');
Key := #0;
end;
end;Funcionou, Obrigado pela a ajudá!
Responder
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)