[WD20] RestartProgram() From Exception Window

Startbeitrag von Curtis am 08.11.2017 22:20

Does anyone know how to restart the app after closing the exception window?

I imported the windows into my app so I could customize them. I added a button that has a single line of code, RestartProgram(), but this does not work. RestartProgram() does work if I call it from my main window, but when I call it from the exception window all it does is close the app.

This is a 32 bit windows app. In the generation of my exe I allow multiple instances, but I actually disallow this by putting the following code at the beginning of my project initialization. I do it this way so that I can control the error message shown to our users.

IF ExeRunning() > 1 AND NOT InTestMode() THEN
Info("Only one instance of the application can be run at a time.")


Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.