first of all, I know I have seen the function for the "hourclass", but I can't find it. I mean a messagebox with the rotating image blocking all the views, but not the programm.
I want to use this hourclass bevor this loop, waiting until the Serial.connect reaction ...
B4X:
hourclass.show
Do While MAIN.oBTPrint.connected = False
If IsPrintError Then
Return
End If
DoEvents
Loop
hourclass.hide
...
MyPrintjob
...
Sub Serial1_Connected (Success As Boolean)
If Success Then
Msgbox("connected ...", MAIN.oBTPrint.sName )
MAIN.oBTPrint.connected = True
IsPrintError = False
Else
Msgbox("Verbindungsfehler:" & CRLF & LastException.Message, MAIN.oBTPrint.sName )
MAIN.oBTPrint.connected = False
IsPrintError = True
End If
End Sub
Is there a better way to save cpu usage as DoEvents ?