There must be several methods, the one I have used is working with variables, let's say LastPage for saving lastpage and Pb used in all pages
So in main
Sub Process_Globals
Private LastPage="" As String
Public Pb ="" as String
Private HomeScreen As Page
....
Private Sub Application_Start (Nav As NavigationController)
HomeScreen.Initialize("HomePage")
Let's say your main page calls a Parameter page, before calling parameters.show, just do:
LastPage = "parameters"
parameters.show
In Parameter, you can intercept the page is going to "back" in this Sub
Page_Disappear , and saving what you want before page really disappears:
Private Sub parameters_Disappear
If PwrM <= PwrL Then
Main.Pb = Main.Pb & "Warning PowerM Should be Greater than PowerL" & CRLF
End If
...
In Main, a Sub will be raises,
Page_Appear, here you can check the LastPage and pb
Private Sub HomePage_Appear
If LastPage <> "" Then
' handle saves
If LastPage = "parameters" Then
If Pb <> "" Then
Msgbox(Pb,"Please fix errors in Parameters")
Pb = ""
parameters.Show
End If
End If
LastPage = ""
End If
End Sub
Hope this will show you how to do