Sub AppStart (Form1 As Form, Args() As String)
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
'MainForm.RootPane.LoadLayout("Layout1") 'Load the layout file.
MainForm.Show
Log(1)
If NotRegistered = True Then
GravarLog("test message")
End If
Log(4) ' This is happening before 3.'
End Sub
Sub NotRegistered As Boolean
Return True ' just for the sake of the example
End Sub
Sub GravarLog(msg As String)
Dim job1 As HttpJob
job1.Initialize("Job1", Me)
job1.Download2("https://kxmidia.app/kal/gravarlog.php", _
Array As String("msg", msg & " " & DateTime.Time(DateTime.Now)))
Log(2)
Wait For (job1) Jobdone(Job As HttpJob)
Log(3)
If Job.Success = True Then
Log(Job.GetString)
Else
LogError("Error: " & Job.ErrorMessage)
End If
Job.Release
ExitApplication
End Sub