#Region Project Attributes
#MainFormWidth: 600
#MainFormHeight: 600
#End Region
Sub Process_Globals
Private fx As JFX
Private MainForm As Form
Private Label1 As Label
End Sub
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.RootPane.LoadLayout("Layout1") 'Load the layout file.
MainForm.Show
Wait For (TestInternet) Complete (Result As String)
Log("result: " & Result)
Label1.Text = Result
End Sub
'Return true to allow the default exceptions handler to handle the uncaught exception.
Sub Application_Error (Error As Exception, StackTrace As String) As Boolean
Return True
End Sub
Sub TestInternet()As ResumableSub
Dim result As String
Dim Job As HttpJob
Job.Initialize("Job", Me)
Job.Download("https://abc.xyz")
Wait For(Job) JobDone(Job As HttpJob)
If Job.Success Then
'result = Job.GetString
result = "connection success"
Else
'result = Job.ErrorMessage
result = "connection failed"
End If
Job.Release
Return result
End Sub