How to terminate your Delphi application before it starts
It sounds like a contradiction: Why would you start you application and terminate it right away? Well, sometimes we can only “really” launch our main form if certain requirements are met.
- Does my configuration file exist?
- Can I connect to the database?
- Do other data files exist?
- Do my image resources exist?
- Is the hardware sufficient?
In all of these cases you might want to display an error message but not launch your application as a consequence. With Delphi VCL applications, it may seem simple at first. However, there is some housekeeping required in order to stop execution correctly.
The latest episode of “How it Works With Holger” gives you all the essential info you need.