Hello,
I just need to try to find a work around for no DoEvents in B4i.
I want a toastmessage or a label to show briefly, after selecting an option from a message box. At the moment, the code pauses with the WaitFor routine, but the label/message doesn't show. (Though of course it shows when you step thru the code)
The code I have is
I tried using ToastMessageShow instead of a label, but the same problem occurs.
I'm sure there's a workaround I just haven't yet thought of...
I just need to try to find a work around for no DoEvents in B4i.
I want a toastmessage or a label to show briefly, after selecting an option from a message box. At the moment, the code pauses with the WaitFor routine, but the label/message doesn't show. (Though of course it shows when you step thru the code)
The code I have is
B4X:
lblWrong.Visible = True
WaitFor(1000)
lblWrong.Visible = False
B4X:
Sub WaitFor(Milliseconds As Int)
Dim s As Long
s = DateTime.Now
Do While DateTime.Now < s + Milliseconds
Loop
End Sub
I tried using ToastMessageShow instead of a label, but the same problem occurs.
I'm sure there's a workaround I just haven't yet thought of...