Board index » delphi » I want use key return

I want use key return

Hi!
        I want use return key to chang Edit Box not like use Mouse
        to chang Edit Box

Regards

Theeratorn Thongprecha
hs6...@hotmail.com
digi...@inrg.co.th

 

Re:I want use key return


On Tue, 26 Aug 1997 17:09:41 +0700, Theeratorn Thongprecha

Quote
<digi...@inrg.co.th> wrote:
>Hi!
>    I want use return key to chang Edit Box not like use Mouse
>    to chang Edit Box

>Regards

>Theeratorn Thongprecha
>hs6...@hotmail.com
>digi...@inrg.co.th

try:

procedure TfrmILDRate.FormKeyDown(Sender: TObject; var Key: Word;
  Shift: TShiftState);
begin
    if Key = VK_RETURN then
      begin
        Key:= VK_TAB;
        Perform(WM_NEXTDLGCTL,0,0);
      end;
end;

or you can always just use the tab key. :-)

Donnie Miller
drmil...@pldi.net

Re:I want use key return


Quote
Donnie Miller wrote:
> On Tue, 26 Aug 1997 17:09:41 +0700, Theeratorn Thongprecha
> <digi...@inrg.co.th> wrote:

> >Hi!
> >       I want use return key to chang Edit Box not like use Mouse
> >       to chang Edit Box

> >Regards

> >Theeratorn Thongprecha
> >hs6...@hotmail.com
> >digi...@inrg.co.th

> try:

> procedure TfrmILDRate.FormKeyDown(Sender: TObject; var Key: Word;
>   Shift: TShiftState);
> begin
>     if Key = VK_RETURN then
>       begin
>         Key:= VK_TAB;
>         Perform(WM_NEXTDLGCTL,0,0);
>       end;
> end;

> or you can always just use the tab key. :-)

> Donnie Miller
> drmil...@pldi.net

  Ok, this works for most of components...
But what about DBGrid??? How can I use <enter> as tab with DBGrids??

Tambet

Other Threads