Spinny wheel while busy?

I have a background task an an async shell. While that shell is running I need the user interface blocked and a spinning wheel icon (and progress bar) shown.
How would you go about doing this?

Just before you run your shell command, disable the UI and turn on the ProgressBar. In the Shell’s Completed event, reenable the UI and turn off the ProgressBar.

How does one disable the UI? One control at a time?
In my mind the whole page looks semi opaque with a spinning wheel / progress bar.

Yes, one control at a time, but you can put that into a loop.

Or bring up a modal dialog with the progress bar.

This is what I do:

At beginning of process

App.MouseCursor = System.Cursors.Wait

At end of process (Returns cursor to default).

App.MouseCursor = Nil

Not sure that works for web apps.
App.MouseCursor won’t compile.

MouseCursor works with desktop apps.

For a web app, you’ll want to display a modal WebDialog while your process is running (probably with a progress bar or progress wheel) which will disable the other controls on the page. You can close the dialog when your process is complete.

It’s is Xojo is truly programming language for the rest of us, you might consider handling this sort of thing as part of the framework…

[quote=61007:@Paul Lefebvre]MouseCursor works with desktop apps.

For a web app, you’ll want to display a modal WebDialog while your process is running (probably with a progress bar or progress wheel) which will disable the other controls on the page. You can close the dialog when your process is complete.[/quote]

woops, didn’t see this was posted in the “web” channel…

There is simply no way a web site can change the cursor on a client PC… It’s a fact for the rest of us… :stuck_out_tongue:

You can use JavaScript to change the cursor, so should be able to add the feature to the web framework…

Michel: What you say is true. I was not reading the thread deeply enough. I was confusing it with my frustration that you have to code a delay in any time intensive web call.

If a process takes two or three seconds (in real time) the user will click a button over and over and over. For me this resulted in lots of duplicate data in a database and confused users when click “Did nothing”. WOUld love Xojo to handle that for me. I currently use an ugly hack of three timers on the page (Show wait dialog/ do the task/ hide wait dialog)

Back in the eighties, IBM had concluded that an acceptable response time for a mainframe to update a page was 1 second. Seems the web is a regression :wink: