Amigo, seja bem-vindo ao fórum!
Gilvandi escreveu:LastKey()=27
O comando LASTKEY() não tem qualquer retorno na MiniGui, não importa qual tecla seja pressionada.
Gilvandi escreveu:( Janela04.vConta.Caption:=STR(CTS->CODI), Janela04.vTitu.Caption:=CTS->TITU, Janela04.vHistor1.Caption:=ALLTRIM(CTS->Hst1)+' ', Janela04.vHistor2.Caption:=ALLTRIM(CTS->Hst2)+' ', Janela04.vhistor1.SetFocus, JanelaCts.RELEASE )
A função IIF() não vai aceitar este comando acima, vários comandos separados por vírgula.
Você não diz onde está usando este comando, mas pelo jeito deve ser em um Browse ou Grid, então uma saída seria usar o comando
ON KEY ESCAPE OF para executar
Janela04.vConta.SefFocus, por exemplo:
Código: Selecionar todos
ON KEY ESCAPE OF NomedoForm Action {|| Janela04.vConta.SefFocus }
E no ON DBLCLICK, execute o restante do comando, por exemplo:
Código: Selecionar todos
ON DBLCLICK {|| Janela04.vConta.Caption:=STR(CTS->CODI), Janela04.vTitu.Caption:=CTS->TITU, Janela04.vHistor1.Caption:=ALLTRIM(CTS->Hst1)+' ', Janela04.vHistor2.Caption:=ALLTRIM(CTS->Hst2)+' ', Janela04.vhistor1.SetFocus, JanelaCts.RELEASE }
Abraços,