MSDOTnet.org Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Newbie: How to show the wait cursor

 
Post new topic   Reply to topic    MSDOTnet.org Forum Index -> Compact Framework
Author Message
Norbert Unterberg



Joined: 12 Aug 2007
Posts: 24

PostPosted: Wed Jan 30, 2008 5:54 am    Post subject: Newbie: How to show the wait cursor Reply with quote

I have a question that should be easy for you:

How do I show the wait symbol? I mean when an application starts you get the
symbol on the center of the PDA screen with the rotating colors.

Nowe I have some lengthy operation in my app, how do I show this symbol? I'd try
UseWaitCursor, but this does not seem to be supported on the CF.

Thanks,
Norbert

Archived from group: microsoft>public>dotnet>framework>compactframework
Back to top
View user's profile Send private message
Christopher Fairbairn



Joined: 08 Aug 2007
Posts: 19

PostPosted: Wed Jan 30, 2008 9:29 pm    Post subject: Re: Newbie: How to show the wait cursor Reply with quote

Hi,

"Norbert Unterberg" wrote in message @TK2MSFTNGP04.phx.gbl...
> How do I show the wait symbol? I mean when an application starts you get
> the symbol on the center of the PDA screen with the rotating colors.

Try using the following code:

using System.Windows.Forms;

try
{
Cursor.Current = Cursrors.WaitCursor;

// do your lengthy operation here
}
finally
{
Cursor.Current = Cursors.Default;
}

This will show the standard wait cursor , perform your lengthy operation and
then return to the default (no) cursor. I usually use a try/finally block so
that the cursor is correctly returned to the default cursor even if the
lengthy operation throws an exception etc.

Hope this helps,
Christopher Fairbairn
Back to top
View user's profile Send private message
Norbert Unterberg



Joined: 12 Aug 2007
Posts: 24

PostPosted: Wed Jan 30, 2008 6:02 pm    Post subject: Re: Newbie: How to show the wait cursor Reply with quote

Christopher Fairbairn schrieb:

> "Norbert Unterberg" wrote in message
> @TK2MSFTNGP04.phx.gbl...
>> How do I show the wait symbol? I mean when an application starts you
>> get the symbol on the center of the PDA screen with the rotating colors.
>
> Try using the following code:
>
> using System.Windows.Forms;
>
> try
> {
> Cursor.Current = Cursrors.WaitCursor;
>
> // do your lengthy operation here
> }
> finally
> {
> Cursor.Current = Cursors.Default;
> }

Thank you, that did it!

Norbert

Back to top
View user's profile Send private message
Display posts from previous:   
Related Topics:
newbie question Hello, I am just starting to tinker with the How do I bind a datagrid to a dataset that is returned from a webservice for a pocketpc mobile device? Any suggestions of good books out there? Thanks in advance. John

Newbie questions: Help files? ColorDialog? I'm trying to convert a published evB program into CF vb.net hoping to get better performance and continuing support from MS. It's almost done and works perfectly in the desktop version using regular vb.net, however, I can find no support in the CF fram

ODBC "Retry Wait" Hi, Our application is written in asp.net and is accessing DB2 using odbc connection driver. I would like to know more about the "Retry Wait" registry setting under 'odbc connection pooling'. Currently the application is giving a 'no more handles' issues

Launch device app and wait My desktop calls uses to launch an exe on the device, and in order to wait, i keep checking a registry entry to see if the device app has finished. This seems kind of messy. Is there a way to launch an application on the device and wait fo

Invalid cursor state Hi I have an application made in C#, it everyday at 8 o'clock(A.M.) cleans a panel control. This panel contains data from a Sybase database. Every 10 seconds I check, using a sql setence, if there are new data. I make it, using two Timers. One to execute
Post new topic   Reply to topic    MSDOTnet.org Forum Index -> Compact Framework All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group