The problem is that you try to load layouts with an Integer value (currentPage) instead of a String.
Line 154 : Activity.LoadLayout(currentPage)
Sub Activity_Create(FirstTime As Boolean)
currentPage = 1
Activity.LoadLayout(currentPage)
The same in line 721.
But for other pages you have written this routine:
Sub manageviews
' imposta la grafica della pagina indicata in currentPage
Activity.RemoveAllViews
Private p As String = currentPage
Activity.LoadLayout(p)
If currentPage = 2 Then
pnlCoordP2.Top = 100dip
End If
End Sub
Here you transform the integer value of currentPage into a String to load the layout.
Try to replace the two lines Activity.LoadLayout(currentPage) by manageviews.
Sub Activity_Create(FirstTime As Boolean)
currentPage = 1
manageviews
Unfortunately your page management is not the best.
Anyway, the advice from Erel is the best solution.
Concerning the layouts, it seems that you have setup them for a specific device.
Because you use the 'standard' screen size of 320 x 480, but in your layouts there are views outsides the screen.
Be aware that on other devices with different screen sizes the layouts might not look good.