I need a 'SLEEP' and a hourclass ...

Hubert Brandel

Active Member
Licensed User
Longtime User
Hi,

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 ?
 

Hubert Brandel

Active Member
Licensed User
Longtime User
I found the "hourglass" ;-)

ProgressDialogShow (Text As String)
ProgressDialogHide

Online help -> Keywords -> Keywords ...
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…