在 Delphi 中实现控件焦点转移?

要在 Delphi 中实bai现按回车后控件焦点的转移,可以调du用 Windows API 消息发送函数 PostMessage,做法如下:zhi
把 Form1 的 KeyPreview 属性设为 True,在 Edit 和 Memo 的 OnKeyPress 事件dao中加入以下代码:
if Key=#13 then
if not (ActiveControl is TMemo) then
PostMessage(Handle,WM_KERYDOWN,VK_TAB,0);

好的代码像粥一样,都是用时间熬出来的
原文地址:https://www.cnblogs.com/jijm123/p/13767101.html