{"id":2020,"date":"2015-02-06T19:26:20","date_gmt":"2015-02-06T11:26:20","guid":{"rendered":"http:\/\/blog.qdac.cc\/?p=2020"},"modified":"2015-02-06T19:26:20","modified_gmt":"2015-02-06T11:26:20","slug":"fmx-%e5%ba%94%e7%94%a8%e7%a8%8b%e5%ba%8f%e7%8a%b6%e6%80%81%e6%a3%80%e6%b5%8b","status":"publish","type":"post","link":"https:\/\/blog.qdac.cc\/?p=2020","title":{"rendered":"[FMX] \u5e94\u7528\u7a0b\u5e8f\u72b6\u6001\u68c0\u6d4b"},"content":{"rendered":"<p>\u5728 FMX \u5e73\u53f0\u4e0b\uff0cTApplication \u6682\u65f6\u6ca1\u6709\u4e86\u90a3\u4e48\u591a\u7684\u4e8b\u4ef6\uff0c\u6bd4\u5982\u7a0b\u5e8f\u6fc0\u6d3b\u5565\u7684\uff0c\u90a3\u4e48\u5728\u5b83\u4e0b\u9762\u6211\u4eec\u8be5\u5982\u4f55\u5904\u7406\u5462\uff1f\u5b9e\u9645\u4e0a\uff0cFMX \u5e73\u53f0\u4e0b\u7684\u6d88\u606f\u673a\u5236\u91c7\u7528\u7684\u662f\u8ba2\u9605\u673a\u5236\uff0c\u6240\u4ee5\u4f60\u53ea\u9700\u8981\u8ba2\u9605\u00a0TApplicationEventMessage \u6d88\u606f\u5c31\u53ef\u4ee5\u5f97\u5230\u4e86\uff0c\u76ee\u524d\u5b98\u65b9\u672a\u63d0\u4f9b\u76f8\u5e94\u7684\u7ec4\u4ef6\u6765\u652f\u6301\uff0c\u4f46\u5c06\u6765\u6709\u53ef\u80fd\u63d0\u4f9b\uff0c\u54b1\u4eec\u5148\u6765\u8bf4\u4e0b\u6b65\u9aa4\u4f9b\u5927\u5bb6\u53c2\u8003\uff1a<\/p>\n<p>1\u3001\u5f15\u7528\u76f8\u5173\u5355\u5143<\/p>\n<pre class=\"lang:delphi decode:true \">System.Messaging,FMX.Platform<\/pre>\n<p>2\u3001\u8ba2\u9605\u6d88\u606f<\/p>\n<pre class=\"lang:delphi decode:true \"> TMessageManager.DefaultManager.SubscribeToMessage(TApplicationEventMessage, \u4f60\u81ea\u5df1\u7684\u6d88\u606f\u5904\u7406\u51fd\u6570);\r\n<\/pre>\n<p>3\u3001\u5728\u4f60\u81ea\u5df1\u7684\u6d88\u606f\u5904\u7406\u51fd\u6570\u4e2d\u505a\u5177\u4f53\u7684\u5b9e\u73b0\uff0c\u6838\u5fc3\u662f\u8fd9\u4e2a\u7c7b\u578b\u7684\u6210\u5458\uff1a<\/p>\n<pre class=\"lang:delphi decode:true \">TApplicationEvent = (FinishedLaunching, BecameActive, WillBecomeInactive, EnteredBackground, WillBecomeForeground, WillTerminate, LowMemory, TimeChange, OpenURL);\r\n<\/pre>\n<p>\u5269\u4e0b\u7684\u4ee3\u7801\u4ffa\u5c31\u5077\u61d2\u4e86\uff0c\u81ea\u5df1\u5199\u5427\u3002<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728 FMX \u5e73\u53f0\u4e0b\uff0cTApplicati [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","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":[69,8,21],"tags":[149,333,334,332,335],"class_list":["post-2020","post","type-post","status-publish","format-standard","hentry","category-c-builder","category-delphi","category-misc","tag-fmx","tag-333","tag-334","tag-332","tag-335"],"views":4713,"_links":{"self":[{"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/posts\/2020","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=2020"}],"version-history":[{"count":1,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/posts\/2020\/revisions"}],"predecessor-version":[{"id":2021,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/posts\/2020\/revisions\/2021"}],"wp:attachment":[{"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2020"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2020"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2020"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}