{"id":6046,"date":"2025-08-07T18:10:21","date_gmt":"2025-08-07T10:10:21","guid":{"rendered":"https:\/\/blog.qdac.cc\/?p=6046"},"modified":"2025-08-07T18:10:21","modified_gmt":"2025-08-07T10:10:21","slug":"%e6%95%99%e7%a8%8b%e6%80%8e%e4%b9%88%e5%9c%a8%e7%88%b6%e7%b1%bb%e4%b8%ad%e5%88%a4%e6%96%ad%e4%b8%80%e4%b8%aa%e7%b1%bb%e7%9a%84%e8%99%9a%e6%8b%9f%e6%88%90%e5%91%98%e5%87%bd%e6%95%b0%e5%bd%93%e5%89%8d","status":"publish","type":"post","link":"https:\/\/blog.qdac.cc\/?p=6046","title":{"rendered":"[\u6559\u7a0b]\u600e\u4e48\u5728\u7236\u7c7b\u4e2d\u5224\u65ad\u4e00\u4e2a\u7c7b\u7684\u865a\u62df\u6210\u5458\u51fd\u6570\u5f53\u524d\u662f\u5426\u88ab\u5b50\u7c7b\u7ee7\u627f\u8fc7"},"content":{"rendered":"\n<p><strong>\u3010\u5e94\u7528\u573a\u666f\u3011<\/strong><\/p>\n\n\n\n<p>\u7236\u7c7b\u8981\u6839\u636e\u5b50\u7c7b\u662f\u5426\u5b9e\u73b0\u4e86\u5bf9\u5e94\u7684\u63a5\u53e3\u6765\u5224\u65ad\u662f\u5426\u6267\u884c\u6307\u5b9a\u7684\u4ee3\u7801\u3002\u6ce8\u610f\u4e00\u70b9\uff0cDelphi \u662f\u652f\u6301\u7eaf\u865a\u51fd\u6570\u6210\u5458\u7684\u7c7b\u521b\u5efa\u5b9e\u4f8b\uff0c\u6240\u4ee5\u5982\u679c\u7236\u7c7b\u4e0d\u9700\u8981\u7279\u6b8a\u5904\u7406\uff0c\u53ef\u4ee5\u76f4\u63a5\u5b9a\u4e49\u4e3a\u7eaf\u865a\u51fd\u6570\u3002\u4f46\u8c03\u7528\u7684\u65f6\u5019\uff0c\u6211\u4eec\u53ef\u80fd\u8981\u5224\u5b9a\u4e0b\u5b83\u662f\u5426\u88ab\u91cd\u8f7d\uff0c\u4ee5\u51b3\u5b9a\u662f\u5426\u8c03\u7528\u3002<\/p>\n\n\n\n<p><strong>\u3010\u5b9e\u73b0\u601d\u8def\u3011<\/strong><\/p>\n\n\n\n<p>\u95ee\u4e86 AI \u51e0\u6b21\uff0c\u7ed9\u51fa\u7684\u65b9\u6848\u90fd\u4e0d\u662f\u5f88\u6ee1\u610f\uff0c\u5b58\u5728\u786c\u7f16\u7801\u548c\u5176\u5b83\u9650\u5236\uff0c\u6240\u4ee5\u81ea\u5df1\u624b\u52a8\u5199\u4e86\u4e0b\u3002<\/p>\n\n\n\n<p>1\u3001\u901a\u8fc7\u9012\u5f52 ClassType \u627e\u5230\u7236\u7c7b\u7684 ClassType \u5b9a\u4e49\u3002<\/p>\n\n\n\n<p>2\u3001\u627e\u5230\u7236\u7c7b\u5bf9\u5e94\u51fd\u6570\u7684\u4ee3\u7801\u5730\u5740\u3002<\/p>\n\n\n\n<p>3\u3001\u6bd4\u8f83\u5f53\u524d\u7c7b\u5bf9\u5e94\u65b9\u6cd5\u7684\u4ee3\u7801\u5730\u5740\u662f\u5426\u4e0e\u7236\u7c7b\u5bf9\u5e94\u51fd\u6570\u7684\u4ee3\u7801\u5730\u5740\u4e00\u81f4\u3002<\/p>\n\n\n\n<p><strong>\u3010\u53c2\u8003\u4ee3\u7801\u3011<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>type\n  TfmBase=class(TFrame)\n  ...\n  protected\n    procedure DoQuickQuery;virtual;abstract;\n  public\n    procedure AfterConstruction;override;\n  end;\n\nprocedure TfmBase.AfterConstruction;\ntype\n  TMethodType=procedure (Sender:TObject) of object;\nvar\n  Addr,ABase:TMethodType;\n  AChildMethod:TMethod absolute Addr;\n  ABaseMethod:TMethod absolute ABase;\n  AClass:TClass;\nbegin\n  AClass:=ClassType;\n  while AClass&lt;>TfmBase do\n    AClass:=AClass.ClassParent;\n  ABase:=TfmBase(@AClass).DoQuickQuery;\n  Addr:=DoQuickQuery;\n  if ABase.Code&lt;>Addr.Code then\n     RegisterShortcut('\u5feb\u901f\u67e5\u8be2',Shortcut(VK_RETURN,&#91;ssCtrl]),DoQuickQuery);\nend;<\/code><\/pre>\n\n\n\n<p>\u4e0a\u9762\u7684\u4ee3\u7801\u4e2d\uff0cRegisterShortcut \u51fd\u6570\u53ea\u6709\u68c0\u6d4b\u5230\u5b50\u7c7b\u5b9e\u73b0\u4e86 DoQuickQuery \u65f6\uff0c\u624d\u4f1a\u5728\u7528\u6237\u6309\u4e0b Ctrl+\u56de\u8f66 \u65f6\uff0c\u81ea\u52a8\u8c03\u7528 DoQuickQuery \u6765\u6267\u884c\u5bf9\u5e94\u7684\u67e5\u8be2\u3002\u6bd4\u5982\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>type\n  TfmOrderManager=class(TfmBase)\n  protected\n    procedure DoQuickQuery;override;\n  end;\n...\nprocedure TfmOrderManager.DoQuickQuery;\nbegin\n  ShowMessage('Hello,world');\nend;\n<\/code><\/pre>\n\n\n\n<p>\u8fd9\u6837\u5c31\u4e0d\u9700\u8981\u5b50\u7c7b\u91cd\u590d\u53bb\u6ce8\u518c\u4e00\u4e9b\u516c\u5171\u884c\u4e3a\uff0c\u53ea\u9700\u8981\u5b9e\u73b0\u5373\u53ef\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3010\u5e94\u7528\u573a\u666f\u3011 \u7236\u7c7b\u8981\u6839\u636e\u5b50\u7c7b\u662f\u5426\u5b9e\u73b0\u4e86\u5bf9 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[8,603],"tags":[],"class_list":["post-6046","post","type-post","status-publish","format-standard","hentry","category-delphi","category-603"],"views":863,"_links":{"self":[{"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/posts\/6046","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6046"}],"version-history":[{"count":1,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/posts\/6046\/revisions"}],"predecessor-version":[{"id":6047,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/posts\/6046\/revisions\/6047"}],"wp:attachment":[{"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6046"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6046"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6046"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}