This may be the dumbest question ever asked here but I'm so used to VB that even simple things about Basic4android stump me. In the following code below, I want to move the code contained in Sub Activity_Resume into a code module sub. Once I do though its like pnlGraph and XYGraph are no longer recognized. What is the proper way to declare them?
Thanks Tony
#Region Module Attributes
#End Region
'Activity module
Sub Process_Globals
End Sub
Sub Globals
Dim pnlGraph As Panel
Dim XYGraph As Canvas
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("main1")
End Sub
Sub Activity_Resume
XYGraph.Initialize(pnlGraph)
Dim Border etc etc
Dim Rect1 As Rect
Rect1.Initialize(Border,Border,GraphWidth,GraphHeight)
XYGraph.DrawRect(Rect1,Colors.Black,False,2)
End Sub
Thanks Tony
#Region Module Attributes
#End Region
'Activity module
Sub Process_Globals
End Sub
Sub Globals
Dim pnlGraph As Panel
Dim XYGraph As Canvas
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("main1")
End Sub
Sub Activity_Resume
XYGraph.Initialize(pnlGraph)
Dim Border etc etc
Dim Rect1 As Rect
Rect1.Initialize(Border,Border,GraphWidth,GraphHeight)
XYGraph.DrawRect(Rect1,Colors.Black,False,2)
End Sub