I am using an InputQuery to enable the user to have quick access to other parts of the system. The problem is that the process is to give agility and to press twice the Enter key goes against the proposed goal. When you press the Enter key once, the focus will go to the OK button and pressing the Enter key again will make the OK is pressed. What I want is that by pressing Enter , the OK is already simulated. I know it's possible to create a new InputQuery to fit what I need. But I want to know if it's possible and if so, how to do in the InputQuery default provided by Delphi .
if (InputQuery('Acessibilidade', 'Digite a tela', sTela)) and (Trim(sTela) <> '') then
begin
try
sTela := Trim(StringReplace(sTela,'''','',[rfReplaceAll]));
Query1.Close;
Query1.SQL.Clear;
Query1.SQL.Add('SELECT * FROM TELAS ');
Query1.SQL.Add('WHERE TELA = '+Aspas(sTela));
Query1.Open;
if Query1.IsEmpty then
Application.MessageBox('Tela inválida.','Atenção',MB_OK+MB_ICONINFORMATION)
else
Abre(Query1.FieldByName('tela').AsString);
finally
Query1.Close;
end;
end;