Sub Btn_Load_WebPage_Click
Btn_Action.Enabled=False
Pnl_Loading.Visible=True
Pnl_Loading.BringToFront
Counter_Click=0
Btn_Action.Text="Action Clicked " & Counter_Click & " times"
Sleep(200)
Dim j As HttpJob
j.Initialize("", Me) 'name is empty as it is no longer needed
j.Download("https://www.b4x.com/")
Wait For (j) JobDone(j As HttpJob)
If j.Success Then
'Do some staff...
Dim a=0 As Int
For i=0 To 4000000
If i Mod 5000 = 1 Then Sleep(10)
a=a+Sqrt(Rnd(0,10))
Next
Else
Log(j.ErrorMessage)
' Use log or use asyncdialogs
'Msgbox(j.ErrorMessage,"Error")
End If
j.Release
Sleep(200)
Pnl_Loading.Visible=False
Btn_Action.Enabled=True
End Sub