Fórum Enter com função de TAB #207403
19/01/2004
0
Obrigado.
Diegus
Curtir tópico
+ 0Posts
19/01/2004
Bilatto
Procedure TMainForm.FormKeyPress(Sender: TObject; var Key: Char);
begin
if Key = #13 then begin
Key := 0;
PostMessage(Handle, WM_NEXTDLGCTL, 0, 0);
end;
end;
Use esta rotina que já foi usada e aprovada.
Gostei + 0
19/01/2004
Henrique.ams
Gostei + 0
19/01/2004
Deus
De nada.
dEUS.
Gostei + 0
19/01/2004
Nish
Gostei + 0
19/01/2004
Csantin
//////////////////////////////////////////////////////////////////
procedure TfrPrincipal.FormCreate(Sender: TObject);
begin
Application.OnMessage := MudarComEnter;
end;
/////////////////////////////////////////////////////////////////
Ai eh soh criar no formulario principal a funcao MudarComEnter
//////////////////////////////////////////////////////////////////
procedure TfrPrincipal.MudarComEnter(var Msg: TMsg; var Handled: Boolean);
begin
If not ((Screen.ActiveControl is TCustomMemo) or
(Screen.ActiveControl is TCustomGrid) or
(Screen.ActiveControl is TBitBtn) or
(Screen.ActiveForm.ClassName = ´TMessageForm´)) then
begin
If Msg.message = WM_KEYDOWN then
begin
Case Msg.wParam of
VK_RETURN: begin
Msg.wParam := 0;
Screen.ActiveForm.Perform(WM_NextDlgCtl,0,0);
end;
end;
end;
end;
end;
Falow!!
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)