If Form1 is unsaved, this returns a value of true and if the user attempts to close the app then the confirmation dialogue is displayed. If the form has already been saved then the value returned is false and so the app just closes
If the app has 3 separate forms on 3 separate screens, and you want to make sure the form on the current screen has always been saved before exiting, this can be achieved using the Switch function
Assign the current screen name to a variable, in this case the variable varCurrentScreen, using each screen’s OnVisible property