{"id":981,"date":"2019-12-29T15:25:44","date_gmt":"2019-12-29T20:25:44","guid":{"rendered":"https:\/\/www.baronsoftware.com\/Blog\/?p=981"},"modified":"2019-12-29T15:25:51","modified_gmt":"2019-12-29T20:25:51","slug":"terminating-an-application-when-using-delphi","status":"publish","type":"post","link":"https:\/\/www.baronsoftware.com\/Blog\/terminating-an-application-when-using-delphi\/","title":{"rendered":"Terminating an Application when using Delphi"},"content":{"rendered":"\n<p>Sometimes there are reasons to terminate an application due to unforeseeable issues and there has been a lot of talk how to handle this event.  Let&#8217;s go over a simple application and break down what needs to be done.<\/p>\n\n\n\n<h2>Go to the code<\/h2>\n\n\n\n<p>The initial code opens up a splash screen, displays it and finally releases it after a few moments.<\/p>\n\n\n\n<p>  <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>      \n      Splashscreen.Show;\n      Splashscreen.Update;\n      Sleep(2000);\n      Splashscreen.Free;\n      Application.Initialize;<\/code><\/pre>\n\n\n\n<p>The application defaults are set with the title and the help file as well as creating the data module along with the login screen.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>  Application.DefaultFont.Name := 'Arial';\n  Application.MainFormOnTaskBar := True;\n  Application.Title := 'Application Name';\n  Application.HelpFile := ExtractFilePath(Application.ExeName) + 'Help.CHM';\n  Application.CreateForm(TDM, DM);\n  Application.CreateForm(TfrmLogin, frmLogin);<\/code><\/pre>\n\n\n\n<p>The application at this point will open up the login screen allowing the user to enter their information. The license is also checked at this stage to see if the client has a valid license.<\/p>\n\n\n\n<p>If the license is invalid a mrCancel is set back from the login screen after the user was notified that the license was invalid.  At this point the important steps is to release the data module and terminate the application.<\/p>\n\n\n\n<p>The application ProcessMessages  permits the application to process messages that are currently in the message queue. ProcessMessages cycles the Windows message loop until it is empty, and then returns control to the application.  It is just a method to clean up everything before exiting the application.<\/p>\n\n\n\n<p>Finally you will see if everything is fine you can open up the main form.  On a note concerning releasing objects.  During a debug session, not releasing the data module would actually show an issue.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>  ValidLicense := frmLogin.ShowModal;\n  frmLogin.Free;\n  if (ValidLicense = mrCancel) then\n  begin\n    DM.Free;\n    Application.Terminate;\n    Application.ProcessMessages;\n  end\n  else\n  begin\n    Application.CreateForm(TfrmMainForm, frmMainForm);\n    Application.Run;\n  end;<\/code><\/pre>\n\n\n\n<p>Things can be done differently within the application if there is a fatal event by simply closing the main form and cleaning up any open objects.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><a href=\"https:\\\\www.baronsoftware.com\" target=\"_blank\" rel=\"noreferrer noopener\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"422\" height=\"114\" data-attachment-id=\"950\" data-permalink=\"https:\/\/www.baronsoftware.com\/Blog\/baronsoftwarelogo_2020-fw\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.baronsoftware.com\/Blog\/wp-content\/uploads\/2019\/08\/BaronSoftwareLogo_2020.fw_.png?fit=422%2C114&amp;ssl=1\" data-orig-size=\"422,114\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"BaronSoftwareLogo_2020.fw\" data-image-description=\"&lt;p&gt;Data Security can no longer be a requirement of the IT Department.  It is vital that the entire company that are within the network be on their utmost watch. The importance today of cyber security cannot be stressed enough.&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Cyber Security&lt;\/p&gt;\n\" data-large-file=\"https:\/\/i0.wp.com\/www.baronsoftware.com\/Blog\/wp-content\/uploads\/2019\/08\/BaronSoftwareLogo_2020.fw_.png?fit=422%2C114&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.baronsoftware.com\/Blog\/wp-content\/uploads\/2019\/08\/BaronSoftwareLogo_2020.fw_.png?resize=422%2C114&#038;ssl=1\" alt=\"Baron Software\" class=\"wp-image-950\" srcset=\"https:\/\/i0.wp.com\/www.baronsoftware.com\/Blog\/wp-content\/uploads\/2019\/08\/BaronSoftwareLogo_2020.fw_.png?w=422&amp;ssl=1 422w, https:\/\/i0.wp.com\/www.baronsoftware.com\/Blog\/wp-content\/uploads\/2019\/08\/BaronSoftwareLogo_2020.fw_.png?resize=300%2C81&amp;ssl=1 300w\" sizes=\"(max-width: 422px) 100vw, 422px\" \/><\/a><\/figure><\/div>\n\n\n\n<p>There has been discussion in <a href=\"https:\/\/stackoverflow.com\/questions\/30415407\/which-is-the-proper-way-to-terminate-a-delphi-application\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"stackoverflow (opens in a new tab)\">stackoverflow<\/a> on this matter.<\/p>\n\n\n\n<p>Calling Terminate allows the application to shut down in an orderly fashion. Terminate calls the Windows API PostQuitMessage function to perform an orderly shutdown of the application.<\/p>\n\n\n\n<p>Finally, the key when leaving an application after a fatal issue is to clean up.  Freeing objects, closing databases will make the application follow good guidelines.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sometimes there are reasons to terminate an application due to unforeseeable issues and there has been a lot of talk how to handle this event. Let&#8217;s go over a simple application and break down what needs to be done. Go to the code The initial code opens up a splash screen, displays it and finally [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rop_custom_images_group":[],"rop_custom_messages_group":[],"rop_publish_now":"initial","rop_publish_now_accounts":[],"rop_publish_now_history":[],"rop_publish_now_status":"pending","_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[5,31],"tags":[20,7,9,6],"class_list":["post-981","post","type-post","status-publish","format-standard","hentry","category-rad-studio-embarcadero-delphi-development","category-software-development-concepts","tag-delphi","tag-development","tag-pascal","tag-software"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Terminating an Application when using Delphi - Baron Software<\/title>\n<meta name=\"description\" content=\"Terminating an Application when using Delphi due to unforeseeable issues and there has been a lot of talk how to handle this event.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.baronsoftware.com\/Blog\/terminating-an-application-when-using-delphi\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Terminating an Application when using Delphi - Baron Software\" \/>\n<meta property=\"og:description\" content=\"Terminating an Application when using Delphi due to unforeseeable issues and there has been a lot of talk how to handle this event.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.baronsoftware.com\/Blog\/terminating-an-application-when-using-delphi\/\" \/>\n<meta property=\"og:site_name\" content=\"Baron Software\" \/>\n<meta property=\"article:published_time\" content=\"2019-12-29T20:25:44+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-12-29T20:25:51+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.baronsoftware.com\/Blog\/wp-content\/uploads\/2019\/08\/BaronSoftwareLogo_2020.fw_.png\" \/>\n<meta name=\"author\" content=\"richard@baronsoftware.com\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"Terminating a Delphi application.\" \/>\n<meta name=\"twitter:description\" content=\"Sometimes there are reasons to terminate an application due to unforeseeable issues and there has been a lot of talk how to handle this event.\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/i0.wp.com\/www.baronsoftware.com\/Blog\/wp-content\/uploads\/2019\/08\/BaronSoftwareLogo_2020.fw_.png?fit=422%2C114&ssl=1\" \/>\n<meta name=\"twitter:creator\" content=\"@Rbaroniunas\" \/>\n<meta name=\"twitter:site\" content=\"@Rbaroniunas\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"richard@baronsoftware.com\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.baronsoftware.com\\\/Blog\\\/terminating-an-application-when-using-delphi\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.baronsoftware.com\\\/Blog\\\/terminating-an-application-when-using-delphi\\\/\"},\"author\":{\"name\":\"richard@baronsoftware.com\",\"@id\":\"https:\\\/\\\/www.baronsoftware.com\\\/Blog\\\/#\\\/schema\\\/person\\\/079d370e4230be9d5f75885bb33dd8cd\"},\"headline\":\"Terminating an Application when using Delphi\",\"datePublished\":\"2019-12-29T20:25:44+00:00\",\"dateModified\":\"2019-12-29T20:25:51+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.baronsoftware.com\\\/Blog\\\/terminating-an-application-when-using-delphi\\\/\"},\"wordCount\":335,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.baronsoftware.com\\\/Blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.baronsoftware.com\\\/Blog\\\/terminating-an-application-when-using-delphi\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.baronsoftware.com\\\/Blog\\\/wp-content\\\/uploads\\\/2019\\\/08\\\/BaronSoftwareLogo_2020.fw_.png\",\"keywords\":[\"Delphi\",\"Development\",\"Pascal\",\"Software\"],\"articleSection\":[\"Rad Studio Delphi Development\",\"Software development Concepts\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.baronsoftware.com\\\/Blog\\\/terminating-an-application-when-using-delphi\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.baronsoftware.com\\\/Blog\\\/terminating-an-application-when-using-delphi\\\/\",\"url\":\"https:\\\/\\\/www.baronsoftware.com\\\/Blog\\\/terminating-an-application-when-using-delphi\\\/\",\"name\":\"Terminating an Application when using Delphi - Baron Software\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.baronsoftware.com\\\/Blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.baronsoftware.com\\\/Blog\\\/terminating-an-application-when-using-delphi\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.baronsoftware.com\\\/Blog\\\/terminating-an-application-when-using-delphi\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.baronsoftware.com\\\/Blog\\\/wp-content\\\/uploads\\\/2019\\\/08\\\/BaronSoftwareLogo_2020.fw_.png\",\"datePublished\":\"2019-12-29T20:25:44+00:00\",\"dateModified\":\"2019-12-29T20:25:51+00:00\",\"description\":\"Terminating an Application when using Delphi due to unforeseeable issues and there has been a lot of talk how to handle this event.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.baronsoftware.com\\\/Blog\\\/terminating-an-application-when-using-delphi\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.baronsoftware.com\\\/Blog\\\/terminating-an-application-when-using-delphi\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.baronsoftware.com\\\/Blog\\\/terminating-an-application-when-using-delphi\\\/#primaryimage\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/www.baronsoftware.com\\\/Blog\\\/wp-content\\\/uploads\\\/2019\\\/08\\\/BaronSoftwareLogo_2020.fw_.png?fit=422%2C114&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/www.baronsoftware.com\\\/Blog\\\/wp-content\\\/uploads\\\/2019\\\/08\\\/BaronSoftwareLogo_2020.fw_.png?fit=422%2C114&ssl=1\",\"width\":422,\"height\":114,\"caption\":\"Cyber Security\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.baronsoftware.com\\\/Blog\\\/terminating-an-application-when-using-delphi\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.baronsoftware.com\\\/Blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Terminating an Application when using Delphi\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.baronsoftware.com\\\/Blog\\\/#website\",\"url\":\"https:\\\/\\\/www.baronsoftware.com\\\/Blog\\\/\",\"name\":\"Baron Software\",\"description\":\"Highest Quality Software Developed.\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.baronsoftware.com\\\/Blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.baronsoftware.com\\\/Blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.baronsoftware.com\\\/Blog\\\/#organization\",\"name\":\"Baron Software\",\"url\":\"https:\\\/\\\/www.baronsoftware.com\\\/Blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.baronsoftware.com\\\/Blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/i2.wp.com\\\/www.baronsoftware.com\\\/Blog\\\/wp-content\\\/uploads\\\/2018\\\/01\\\/BaronSoftwareLogo.fw_.png?fit=1920%2C400&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i2.wp.com\\\/www.baronsoftware.com\\\/Blog\\\/wp-content\\\/uploads\\\/2018\\\/01\\\/BaronSoftwareLogo.fw_.png?fit=1920%2C400&ssl=1\",\"width\":1920,\"height\":400,\"caption\":\"Baron Software\"},\"image\":{\"@id\":\"https:\\\/\\\/www.baronsoftware.com\\\/Blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/x.com\\\/Rbaroniunas\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.baronsoftware.com\\\/Blog\\\/#\\\/schema\\\/person\\\/079d370e4230be9d5f75885bb33dd8cd\",\"name\":\"richard@baronsoftware.com\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e5a3cc457a883c420e8af899f2639359d220ae6bfed4587ca7ed17f45ca0c21c?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e5a3cc457a883c420e8af899f2639359d220ae6bfed4587ca7ed17f45ca0c21c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e5a3cc457a883c420e8af899f2639359d220ae6bfed4587ca7ed17f45ca0c21c?s=96&d=mm&r=g\",\"caption\":\"richard@baronsoftware.com\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Terminating an Application when using Delphi - Baron Software","description":"Terminating an Application when using Delphi due to unforeseeable issues and there has been a lot of talk how to handle this event.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.baronsoftware.com\/Blog\/terminating-an-application-when-using-delphi\/","og_locale":"en_US","og_type":"article","og_title":"Terminating an Application when using Delphi - Baron Software","og_description":"Terminating an Application when using Delphi due to unforeseeable issues and there has been a lot of talk how to handle this event.","og_url":"https:\/\/www.baronsoftware.com\/Blog\/terminating-an-application-when-using-delphi\/","og_site_name":"Baron Software","article_published_time":"2019-12-29T20:25:44+00:00","article_modified_time":"2019-12-29T20:25:51+00:00","og_image":[{"url":"https:\/\/www.baronsoftware.com\/Blog\/wp-content\/uploads\/2019\/08\/BaronSoftwareLogo_2020.fw_.png","type":"","width":"","height":""}],"author":"richard@baronsoftware.com","twitter_card":"summary_large_image","twitter_title":"Terminating a Delphi application.","twitter_description":"Sometimes there are reasons to terminate an application due to unforeseeable issues and there has been a lot of talk how to handle this event.","twitter_image":"https:\/\/i0.wp.com\/www.baronsoftware.com\/Blog\/wp-content\/uploads\/2019\/08\/BaronSoftwareLogo_2020.fw_.png?fit=422%2C114&ssl=1","twitter_creator":"@Rbaroniunas","twitter_site":"@Rbaroniunas","twitter_misc":{"Written by":"richard@baronsoftware.com","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.baronsoftware.com\/Blog\/terminating-an-application-when-using-delphi\/#article","isPartOf":{"@id":"https:\/\/www.baronsoftware.com\/Blog\/terminating-an-application-when-using-delphi\/"},"author":{"name":"richard@baronsoftware.com","@id":"https:\/\/www.baronsoftware.com\/Blog\/#\/schema\/person\/079d370e4230be9d5f75885bb33dd8cd"},"headline":"Terminating an Application when using Delphi","datePublished":"2019-12-29T20:25:44+00:00","dateModified":"2019-12-29T20:25:51+00:00","mainEntityOfPage":{"@id":"https:\/\/www.baronsoftware.com\/Blog\/terminating-an-application-when-using-delphi\/"},"wordCount":335,"commentCount":0,"publisher":{"@id":"https:\/\/www.baronsoftware.com\/Blog\/#organization"},"image":{"@id":"https:\/\/www.baronsoftware.com\/Blog\/terminating-an-application-when-using-delphi\/#primaryimage"},"thumbnailUrl":"https:\/\/www.baronsoftware.com\/Blog\/wp-content\/uploads\/2019\/08\/BaronSoftwareLogo_2020.fw_.png","keywords":["Delphi","Development","Pascal","Software"],"articleSection":["Rad Studio Delphi Development","Software development Concepts"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.baronsoftware.com\/Blog\/terminating-an-application-when-using-delphi\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.baronsoftware.com\/Blog\/terminating-an-application-when-using-delphi\/","url":"https:\/\/www.baronsoftware.com\/Blog\/terminating-an-application-when-using-delphi\/","name":"Terminating an Application when using Delphi - Baron Software","isPartOf":{"@id":"https:\/\/www.baronsoftware.com\/Blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.baronsoftware.com\/Blog\/terminating-an-application-when-using-delphi\/#primaryimage"},"image":{"@id":"https:\/\/www.baronsoftware.com\/Blog\/terminating-an-application-when-using-delphi\/#primaryimage"},"thumbnailUrl":"https:\/\/www.baronsoftware.com\/Blog\/wp-content\/uploads\/2019\/08\/BaronSoftwareLogo_2020.fw_.png","datePublished":"2019-12-29T20:25:44+00:00","dateModified":"2019-12-29T20:25:51+00:00","description":"Terminating an Application when using Delphi due to unforeseeable issues and there has been a lot of talk how to handle this event.","breadcrumb":{"@id":"https:\/\/www.baronsoftware.com\/Blog\/terminating-an-application-when-using-delphi\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.baronsoftware.com\/Blog\/terminating-an-application-when-using-delphi\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.baronsoftware.com\/Blog\/terminating-an-application-when-using-delphi\/#primaryimage","url":"https:\/\/i0.wp.com\/www.baronsoftware.com\/Blog\/wp-content\/uploads\/2019\/08\/BaronSoftwareLogo_2020.fw_.png?fit=422%2C114&ssl=1","contentUrl":"https:\/\/i0.wp.com\/www.baronsoftware.com\/Blog\/wp-content\/uploads\/2019\/08\/BaronSoftwareLogo_2020.fw_.png?fit=422%2C114&ssl=1","width":422,"height":114,"caption":"Cyber Security"},{"@type":"BreadcrumbList","@id":"https:\/\/www.baronsoftware.com\/Blog\/terminating-an-application-when-using-delphi\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.baronsoftware.com\/Blog\/"},{"@type":"ListItem","position":2,"name":"Terminating an Application when using Delphi"}]},{"@type":"WebSite","@id":"https:\/\/www.baronsoftware.com\/Blog\/#website","url":"https:\/\/www.baronsoftware.com\/Blog\/","name":"Baron Software","description":"Highest Quality Software Developed.","publisher":{"@id":"https:\/\/www.baronsoftware.com\/Blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.baronsoftware.com\/Blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.baronsoftware.com\/Blog\/#organization","name":"Baron Software","url":"https:\/\/www.baronsoftware.com\/Blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.baronsoftware.com\/Blog\/#\/schema\/logo\/image\/","url":"https:\/\/i2.wp.com\/www.baronsoftware.com\/Blog\/wp-content\/uploads\/2018\/01\/BaronSoftwareLogo.fw_.png?fit=1920%2C400&ssl=1","contentUrl":"https:\/\/i2.wp.com\/www.baronsoftware.com\/Blog\/wp-content\/uploads\/2018\/01\/BaronSoftwareLogo.fw_.png?fit=1920%2C400&ssl=1","width":1920,"height":400,"caption":"Baron Software"},"image":{"@id":"https:\/\/www.baronsoftware.com\/Blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/Rbaroniunas"]},{"@type":"Person","@id":"https:\/\/www.baronsoftware.com\/Blog\/#\/schema\/person\/079d370e4230be9d5f75885bb33dd8cd","name":"richard@baronsoftware.com","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/e5a3cc457a883c420e8af899f2639359d220ae6bfed4587ca7ed17f45ca0c21c?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/e5a3cc457a883c420e8af899f2639359d220ae6bfed4587ca7ed17f45ca0c21c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/e5a3cc457a883c420e8af899f2639359d220ae6bfed4587ca7ed17f45ca0c21c?s=96&d=mm&r=g","caption":"richard@baronsoftware.com"}}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p2e6qU-fP","jetpack-related-posts":[{"id":587,"url":"https:\/\/www.baronsoftware.com\/Blog\/embarcadero-academy-debuts-online-courses\/","url_meta":{"origin":981,"position":0},"title":"Embarcadero Academy Debuts with Online Courses","author":"richard@baronsoftware.com","date":"September 19, 2017","format":false,"excerpt":"Embarcadero Academy Debuts with Online Courses\u00a0 A\u00a0provider of cross-platform application developer productivity tools, today announced the launch of Embarcadero Academy, an online school for developers of all levels. The Academy, operated in partnership with Embarcadero by CodePower, offers a wide variety of expert-led courses in Delphi and C++Builder skills and\u2026","rel":"","context":"In &quot;Rad Studio Delphi Development&quot;","block_context":{"text":"Rad Studio Delphi Development","link":"https:\/\/www.baronsoftware.com\/Blog\/category\/rad-studio-embarcadero-delphi-development\/"},"img":{"alt_text":"Delphi","src":"https:\/\/i0.wp.com\/www.baronsoftware.com\/Blog\/wp-content\/uploads\/2016\/01\/Embarcadero-Logo-e1467218648875-300x34.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":1197,"url":"https:\/\/www.baronsoftware.com\/Blog\/why-choose-delphi-for-rapid-application-development\/","url_meta":{"origin":981,"position":1},"title":"Why Choose Delphi for Rapid Application Development","author":"richard@baronsoftware.com","date":"December 13, 2024","format":false,"excerpt":"Delphi is a rapid application development IDE that shortens time for designing and implementing an application for various platforms. Some of the highlights A visual design interface. Fast compilation speeds Strong database integration. A mature component library (VCL). Its ability to maintain legacy systems. Delphi can create high-performance applications with\u2026","rel":"","context":"In &quot;Rad Studio Delphi Development&quot;","block_context":{"text":"Rad Studio Delphi Development","link":"https:\/\/www.baronsoftware.com\/Blog\/category\/rad-studio-embarcadero-delphi-development\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":983,"url":"https:\/\/www.baronsoftware.com\/Blog\/how-to-restart-a-vcl-delphi-application-while-using-a-mutex\/","url_meta":{"origin":981,"position":2},"title":"How to restart a VCL Delphi application while using a Mutex","author":"richard@baronsoftware.com","date":"January 5, 2020","format":false,"excerpt":"How to restart a VCL Delphi application while using a Mutex. This article puts all of the research in one single page. Using a mutex prevents multiple application instances from occurring. You may wonder why would you wish to restart an application. It doesn't mean there was a software defect\u2026","rel":"","context":"In &quot;Rad Studio Delphi Development&quot;","block_context":{"text":"Rad Studio Delphi Development","link":"https:\/\/www.baronsoftware.com\/Blog\/category\/rad-studio-embarcadero-delphi-development\/"},"img":{"alt_text":"Baron Software","src":"https:\/\/i0.wp.com\/www.baronsoftware.com\/Blog\/wp-content\/uploads\/2019\/08\/BaronSoftwareLogo_2020.fw_.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":212,"url":"https:\/\/www.baronsoftware.com\/Blog\/delphi-create-a-process-or-shelling-to-start-up-an-external-application\/","url_meta":{"origin":981,"position":3},"title":"Delphi Create a Process or Shelling to start up an external application.","author":"richard@baronsoftware.com","date":"January 14, 2016","format":false,"excerpt":"Delphi Create a Process or Shelling to start up an external application. Since Windows 10 has been released there has been hiccups when dealing with the Windows API. The strange behavior may not return an error code and may actually end up doing nothing leaving you more perplexed then ever.\u2026","rel":"","context":"In &quot;Computer PC Tips - bits and bytes&quot;","block_context":{"text":"Computer PC Tips - bits and bytes","link":"https:\/\/www.baronsoftware.com\/Blog\/category\/pc-tips-bits-bytes\/"},"img":{"alt_text":"logo","src":"https:\/\/i0.wp.com\/www.baronsoftware.com\/Blog\/wp-content\/uploads\/2014\/12\/logo.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":993,"url":"https:\/\/www.baronsoftware.com\/Blog\/gotchas-when-using-delphi\/","url_meta":{"origin":981,"position":4},"title":"Gotchas when using Delphi Update","author":"richard@baronsoftware.com","date":"January 13, 2020","format":false,"excerpt":"Sometimes when you are programming using Embarcadero Delphi you will come up with a few Gotchas. These are not bugs but more as a pain. Initially you create an application in a debug mode while you are testing the code. You have a icon for the application making it look\u2026","rel":"","context":"In &quot;Rad Studio Delphi Development&quot;","block_context":{"text":"Rad Studio Delphi Development","link":"https:\/\/www.baronsoftware.com\/Blog\/category\/rad-studio-embarcadero-delphi-development\/"},"img":{"alt_text":"Baron Software","src":"https:\/\/i0.wp.com\/www.baronsoftware.com\/Blog\/wp-content\/uploads\/2019\/08\/BaronSoftwareLogo_2020.fw_.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":438,"url":"https:\/\/www.baronsoftware.com\/Blog\/happy-birthday-delphi-22-years-counting\/","url_meta":{"origin":981,"position":5},"title":"Happy Birthday to Delphi at 22 years and counting","author":"richard@baronsoftware.com","date":"February 14, 2017","format":false,"excerpt":"Happy Birthday to Delphi at 22 years and counting Well with the next release, \"Godzilla - Tokyo\" currently in beta testing and getting prepared to support Linux servers, there is no better way then to shout out a happy birthday to Delphi. Delphi History Delphi was originally developed by Borland\u2026","rel":"","context":"In &quot;Rad Studio Delphi Development&quot;","block_context":{"text":"Rad Studio Delphi Development","link":"https:\/\/www.baronsoftware.com\/Blog\/category\/rad-studio-embarcadero-delphi-development\/"},"img":{"alt_text":"Delphi for Linux","src":"https:\/\/i0.wp.com\/www.baronsoftware.com\/Blog\/wp-content\/uploads\/2016\/12\/LinuxIsComing-300x300.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.baronsoftware.com\/Blog\/wp-json\/wp\/v2\/posts\/981","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.baronsoftware.com\/Blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.baronsoftware.com\/Blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.baronsoftware.com\/Blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.baronsoftware.com\/Blog\/wp-json\/wp\/v2\/comments?post=981"}],"version-history":[{"count":1,"href":"https:\/\/www.baronsoftware.com\/Blog\/wp-json\/wp\/v2\/posts\/981\/revisions"}],"predecessor-version":[{"id":982,"href":"https:\/\/www.baronsoftware.com\/Blog\/wp-json\/wp\/v2\/posts\/981\/revisions\/982"}],"wp:attachment":[{"href":"https:\/\/www.baronsoftware.com\/Blog\/wp-json\/wp\/v2\/media?parent=981"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.baronsoftware.com\/Blog\/wp-json\/wp\/v2\/categories?post=981"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.baronsoftware.com\/Blog\/wp-json\/wp\/v2\/tags?post=981"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}