Question

Windows Mobile pops up a "busy wheel" - a rotating colour disk - when things are happening . I can't find in the documentation how this is done - can someone point me in the right direction?

We have a situation where we need to prompt the user to say we're doing stuff for a while, but we don't know how long it will take. So we can't do a progress bar, hence the proposal to use this busy wheel.

Was it helpful?

Solution

Use SetCursor/LoadCursor/ShowCursor APIs, like this:

SetCursor(LoadCursor(NULL, IDC_WAIT));

// my code

ShowCursor(FALSE);

OTHER TIPS

Using compactframework.

Spining wheel:

System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.WaitCursor;

Return to normal:

System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.Default;

I'm just guessing here, but I'd imagine it is CWaitCursor. Basically, you just create one on the stack, it appears, and disapppears when it is destructed as it goes out of scope e.g.

void DoSomethingSlow()
{
  CWaitCursor cw;
.
.
.
.
}

From: http://mobiledeveloper.wordpress.com/2006/07/05/wait-cursor/

Have a look at Cursor.Current = Cursors.WaitCursor;

try {
 Cursor.Current = Cursors.WaitCursor;
 //Do something time consuming…
}
finally {
 Cursor.Current = Cursors.Default;
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top