jroriz Active Member Licensed User Longtime User Dec 26, 2018 #1 Hi. I have to refresh a label, but based on my needs, sleep cannot be used and the timer did not do the job. Code: Sub LongProcess For x = 1 To 10000000 mylabel.Text = x 'Sleep(0) - cannot be here because sleep = return, and i cannot leave the sub before it ends 'Timer also did not work. Next End Sub
Hi. I have to refresh a label, but based on my needs, sleep cannot be used and the timer did not do the job. Code: Sub LongProcess For x = 1 To 10000000 mylabel.Text = x 'Sleep(0) - cannot be here because sleep = return, and i cannot leave the sub before it ends 'Timer also did not work. Next End Sub
Erel B4X founder Staff member Licensed User Longtime User Dec 26, 2018 #2 Sleep is the correct solution. You need to learn how to call a resumable sub and wait for result. [B4X] Resumable subs that return values (ResumableSub) Upvote 0
Sleep is the correct solution. You need to learn how to call a resumable sub and wait for result. [B4X] Resumable subs that return values (ResumableSub)
jroriz Active Member Licensed User Longtime User Dec 26, 2018 #3 Erel said: Sleep is the correct solution. You need to learn how to call a resumable sub and wait for result. [B4X] Resumable subs that return values (ResumableSub) Click to expand... Thats It! Upvote 0
Erel said: Sleep is the correct solution. You need to learn how to call a resumable sub and wait for result. [B4X] Resumable subs that return values (ResumableSub) Click to expand... Thats It!