luciano deri Active Member Licensed User Longtime User Jul 26, 2017 #1 Is there something like this in B4A? https://www.b4x.com/android/forum/threads/b4x-resumable-subs-sleep-wait-for.78601/page-2#post-499400 I need a panel with progress bar o progress dialog to show up during a any long elaborations. I try to do this but i have difficult to show progress (Doevents, sleep(0), waith for?) and intercept the press on button to interrupt elaboration. Thank you very much
Is there something like this in B4A? https://www.b4x.com/android/forum/threads/b4x-resumable-subs-sleep-wait-for.78601/page-2#post-499400 I need a panel with progress bar o progress dialog to show up during a any long elaborations. I try to do this but i have difficult to show progress (Doevents, sleep(0), waith for?) and intercept the press on button to interrupt elaboration. Thank you very much
Erel B4X founder Staff member Licensed User Longtime User Jul 26, 2017 #2 Start with the code I posted in the other thread: Code: Copy ProgressDialogShow("Lettura tabella in corso") For i = 0 To dbcursor.RowCount - 1 dbcursor.position = i If i Mod 500 = 0 Then Sleep(0) Do something ... Next ProgressDialogHide Does it work for you? Upvote 0
Start with the code I posted in the other thread: Code: Copy ProgressDialogShow("Lettura tabella in corso") For i = 0 To dbcursor.RowCount - 1 dbcursor.position = i If i Mod 500 = 0 Then Sleep(0) Do something ... Next ProgressDialogHide Does it work for you?
luciano deri Active Member Licensed User Longtime User Jul 26, 2017 #3 No, is not right. Could you look this please? Attachments noise.zip noise.zip 16 KB · Views: 397 Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Jul 26, 2017 #4 It doesn't work because you have put it in the wrong place. The long loop is in StartIC_Click. You need to add it there: Code: Copy For i = 0 To 10000 Log(i) NOISE.NoiseNext If NOISE.Interrotto Then Exit End If If i Mod 500 = 0 Then Sleep(0) Next With that said, your code looks wrong and more complex than it should be. Why are you calling NoiseNext from the loop? It is called by the timer. Upvote 0
It doesn't work because you have put it in the wrong place. The long loop is in StartIC_Click. You need to add it there: Code: Copy For i = 0 To 10000 Log(i) NOISE.NoiseNext If NOISE.Interrotto Then Exit End If If i Mod 500 = 0 Then Sleep(0) Next With that said, your code looks wrong and more complex than it should be. Why are you calling NoiseNext from the loop? It is called by the timer.
Erel B4X founder Staff member Licensed User Longtime User Jul 26, 2017 #5 I've created a simple custom view that shows an animated gif. Check it: https://www.b4x.com/android/forum/threads/custom-view-gifviewer.82104/ Upvote 0
I've created a simple custom view that shows an animated gif. Check it: https://www.b4x.com/android/forum/threads/custom-view-gifviewer.82104/
DonManfred Expert Licensed User Longtime User Jul 26, 2017 #6 Erel said: I've created a simple custom view that shows an animated gif. Click to expand... sweet ;-) Upvote 0
Erel said: I've created a simple custom view that shows an animated gif. Click to expand... sweet ;-)
luciano deri Active Member Licensed User Longtime User Jul 26, 2017 #7 Ok, we are almost there. NoiseNext is call in cicle because noise is initialize without timer. It do so to sincronize gif rotation with to process flow. When noise not work with the timer i can not stop process rightly. See the attach. How can integrate it with https://www.b4x.com/android/forum/threads/custom-view-gifviewer.82104/ ? It can work faster? Thank you very much Last edited: Jul 27, 2017 Upvote 0
Ok, we are almost there. NoiseNext is call in cicle because noise is initialize without timer. It do so to sincronize gif rotation with to process flow. When noise not work with the timer i can not stop process rightly. See the attach. How can integrate it with https://www.b4x.com/android/forum/threads/custom-view-gifviewer.82104/ ? It can work faster? Thank you very much
luciano deri Active Member Licensed User Longtime User Jul 26, 2017 #8 attach Attachments noise.zip noise.zip 16.2 KB · Views: 424 Upvote 0