Fórum Converter TAB em ENTER #148351
21/03/2003
0
Diana
Curtir tópico
+ 0Post mais votado
21/03/2003
EM TODA A APLICAÇÃO 8)
-------
A vantagem em relação as outras é que você coloca apenas no formulario principal, e funciona em toda a aplicação sem a necessidade de inserir um codigo por formulario
Enter funcionando como Tab em toda a aplicação
Uses
Grids
procedure TfrmPri.MudarComEnter(var Msg: TMsg; var Handled: Boolean);
begin
If not ((Screen.ActiveControl is TCustomMemo) or
(Screen.ActiveControl is TCustomGrid) or
(Screen.ActiveForm.ClassName = ´TMessageForm´)) then
begin
If Msg.message = WM_KEYDOWN then
begin
Case Msg.wParam of
VK_RETURN,VK_DOWN : Screen.ActiveForm.Perform(WM_NextDlgCtl,0,0);
VK_UP : Screen.ActiveForm.Perform(WM_NextDlgCtl,1,0);
end;
end;
end;
end;
no evento OnCreate o Form Principal digite a seguinte linha
Application.OnMessage := MudarComEnter;
Jonhy Riper
Gostei + 2
Mais Posts
21/03/2003
Carlos Alberto
Existem componentes prontos que fazem isso. Basta procurar. Se você quiser eu tenho um e posso enviar, basta me passar um e-mail.
carlos@dp2000.com.br
Até mais.
Gostei + 0
21/03/2003
Rafaela
If Key = #13 then
Begin
Key:=0;
Perform(CM_DIALOGKEY,VK_TAB,0);
end;
PRONTO, É SÓ ISSO....
ESPERO TER AJUDADO
RAFAELA
Gostei + 1
21/03/2003
Anonymous
if key = #13 then begin
key := 0;
perform(wm_nextdlgctl, 0, 0);
END;
IF key = 27 then begin
close;
end;
naum esqueça de deichar o keyPreview para true;;;
Gostei + 0
21/03/2003
E_gama
if Key = #13 then begin Key := 0; SelectNext(ActiveControl, True, True); end;
Gostei + 1
07/07/2017
Diana Santos
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)