Sub Activity_Create(FirstTime As Boolean) 'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("TestLayout") 'load the screen layout
If FirstTime Then
SMB1.Initialize("SMB1") 'load the SMB File library
End If
If File.Exists(File.DirInternal,"URLPath.txt") Then
URLServer = File.ReadString(File.DirInternal,"URLPath.txt")
Else
Msgbox("Please click on the tool icon and complete the setup information.","Complete Setups")
End If
'load the department file from network server
SMB1.DownloadFile("smb:" & URLServer ,"tabdep.txt", File.DirRootExternal,"tabdep.txt") 'load department file
Dim Reader As TextReader
Dim line As String
Reader.Initialize(File.OpenInput(File.DirRootExternal,"tabdep.txt"))
If Reader.IsInitialized Then
line = Reader.ReadLine
Do While line <> Null
DepSpinner.Add (line)
line=Reader.ReadLine
Loop
Reader.Close
End If
End Sub