模拟在窗体中按下了tab键(delphi)

 

procedure TF_main.submitKeyPress(Sender: TObject;var Key: Char);
begin
  if key=#13 then //如果按下Enter键
    begin
      ////模拟在窗体中按下了tab键
      PostMessage(F_main.Handle, WM_KEYDOWN, VK_TAB, 0);
    end;
end;

访客: