Fórum Tab pelo Enter #291932
16/08/2005
0
If (Screen.ActiveControl is TCustomedit) or (Screen.ActiveControl is TDBLookupControl) then begin If Msg.message = WM_KEYDOWN then begin if Msg.wParam = VK_RETURN then keybd_event(VK_TAB, 0, KEYEVENTF_EXTENDEDKEY or 0, 0); end; end; e chamo ela assim no código do projeto application.OnMessage:= moduleFuncao.ProximoCampo;
Eu queria que quando o TCustomedit, e TDBLookupControl, tivesse códigos no evento OnKeyPRess, essa rotina acima fosse igonarado.
Sistemald
Curtir tópico
+ 0Posts
22/08/2005
Sistemald
pois quando dou enter, ele executa o procedimento acima, e depois do componente. eu queria que fosse ao contrário.
Gostei + 0
22/08/2005
Nildo
If not assigned( (Screen.ActiveControl as TCustomedit).OnKeyPress ) then Executa a Rotina;
Gostei + 0
22/08/2005
Sistemald
If not assigned( (Screen.ActiveControl as TCustomedit).OnKeyPress ) then Executa a Rotina;
Não funcionou, deu o seguinte erro:
[b:21238ef9a1]Undeclared identifier: ´OnKeyPress´[/b:21238ef9a1]
Gostei + 0
22/08/2005
Sistemald
Gostei + 0
22/08/2005
Nildo
Então coloca, é a única forma :wink:
Gostei + 0
22/08/2005
Sistemald
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)