Private sub startTranslation(SourceLng as string, TargetLng as string, Text as string)
' check Internet
Wait for (checkInternet) Complete (Result as boolean)
If Result then
Wait for Translate(SourceLng,TargetLng,text) Complete (trans as string)
' using clsGoogleTranslate
label1.text = trans
end if
end sub
#####
private Sub checkInternet As ResumableSub
Dim j As HttpJob
j.Initialize("", Me)
j.Download("https://www.google.com")
Wait For (j) JobDone(j As HttpJob)
If j.Success Then
return= True
Else
return= False
End If
j.Release
End Sub