ProgressDialog not spinning

Big JR

Member
Licensed User
Longtime User
In Activity_Create I have this code:

ProgressDialogShow("Loading...")
DoEvents
DoEvents
Activity.LoadLayout("main")
ProgressDialogHide

The layout as quite a few panels and views and takes a few seconds to load, hence the need for the progress dialog.

The progress dialog doesn't spin, presumably because until LoadLayout is finished it isn't getting updated.

How can I get the progress dialog to spin while the layout is loading? Or does it need to have a DoEvents incorporated into the LoadLayout routine?
 
It is late here in Croatia but why don't you try replace some function.
For example

Code: Copy
Activity.LoadLayout("main")
ProgressDialogShow("Loading...")
DoEvents
DoEvents
ProgressDialogHide
 
Upvote 0
The second code won't do what is intended. It is intended that the progress dialog shows while the layout is loading so it has to start before loadLayout. There's no point in a progress dialog that just flashes up after the layout has loaded.
 
Upvote 0
Thanks Erel. I've split the layout into separates, one for each panel with DoEvents in between each load.
 
Upvote 0
Back
Top