-1
I have a project in which I open a form inside the other, and with this in the secondary Forms the Onkeydown event instead of going to the secondary Forms are going to the Main form, more if I press tab on the second screens it will normal, so I decided to simulate the tab.
I know the code to simulate keybd_event(VK_TAB, 0, 0, 0);
more how to do to simulate the reverse?
procedure TfrmAndamento.FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
begin
if ((key=VK_RETURN) or (key=VK_DOWN)) and not((Sender is TMemo) or (Sender is TComboBox) or (Sender is TDBComboBox) or (Sender is TDBGrid))
then
selectNext(ActiveControl,True,True); // <= aqui o sistema da erro pois o ActiveControl sempre vem o objeto que não era o correspondente
end;
You honestly don’t understand why you’re closing the question? "... but if your question has to do with..." - a specific programming problem - OK - a software algorithm - common tools among programmers when applied in software development - practical and well-defined problems concerning software development - OK theoretical doubts about concepts and practices applied to software development - OK - It is not a duplicate question - OK .
– Edu Mendonça
It’s the Stack Overflow custom...
– Tiago Rodrigues