Sub Process_Globals
'These global variables will be declared once when the application starts.
'Public variables can be accessed from all modules.
Public App As Application
Public NavControl As NavigationController
Private Page1 As Page
Private Button1 As Button
Private Panel1 As Panel
Private Panel2 As Panel
Private Button2 As Button
End Sub
Private Sub Application_Start (Nav As NavigationController)
NavControl = Nav
Page1.Initialize("Page1")
Page1.Title = "Page 1"
Page1.RootPanel.LoadLayout("vmain")
Page1.RootPanel.Color = Colors.White
NavControl.ShowPage(Page1)
Panel1.Top = 190dip
Panel1.Left = 120dip
Panel2.Top = 10dip
Panel2.Left = 10dip
End Sub
Sub Page1_appear
Panel1.Top = 190dip
Panel1.Left = 120dip
Panel2.Top = 10dip
Panel2.Left = 10dip
End Sub
Sub Button1_Click
Panel1.Visible = True
Panel2.Visible = False
End Sub
Sub Button2_Click
Panel2.Visible = True
Panel1.Visible = False
End Sub