首先,在主窗体中声明以下private过程:
procedure TMainForm.DoEnterAsTab(var Msg: TMsg; var Handled: Boolean);
begin
if Msg.Message = WM_KEYDOWN then
begin
if Msg.wParam = VK_RETURN then
Keybd_event(VK_TAB, 0, 0, 0);
end; //if
end;

在主窗体的OnCreate事件中加入:
Application.OnMessage := DoEnterAsTab;
posted on 2008-09-07 11:22  漂流侠  阅读(193)  评论(0编辑  收藏  举报