Click here to Skip to main content
15,890,374 members
Home / Discussions / C#
   

C#

 
GeneralRe: Reading Outlook PST files Pin
Dave Kreskowiak17-Jul-04 9:37
mveDave Kreskowiak17-Jul-04 9:37 
GeneralRe: Reading Outlook PST files Pin
bergetun17-Jul-04 23:35
bergetun17-Jul-04 23:35 
GeneralRe: Reading Outlook PST files Pin
Nick Parker18-Jul-04 5:32
protectorNick Parker18-Jul-04 5:32 
GeneralRe: Reading Outlook PST files Pin
Dave Kreskowiak18-Jul-04 9:07
mveDave Kreskowiak18-Jul-04 9:07 
GeneralRe: Reading Outlook PST files Pin
bergetun18-Jul-04 12:01
bergetun18-Jul-04 12:01 
GeneralWaitCursor Pin
Member 93716116-Jul-04 20:46
Member 93716116-Jul-04 20:46 
GeneralRe: WaitCursor Pin
Serge Lobko-Lobanovsky16-Jul-04 23:50
Serge Lobko-Lobanovsky16-Jul-04 23:50 
GeneralRe: WaitCursor Pin
Tom Larsen17-Jul-04 18:32
Tom Larsen17-Jul-04 18:32 
All things derived from Control have a member Cursor which controls the cursor over the control itself.

Cursor itself has a static field Cursor.Current which represents the current cursor for the entire application (technically that isn't quite correct but its a simplification).

You do understand the fundemental principles behind "event driven" programming right? Setting the cursor is just a UI thing. You can change the cursor for a control or the application to anything which doesn't change anything about the input functionality. You seem to misconstrude what is going on when messages are being processed. While you are processing a message in the main UI thread, no more processing is being done. There is no need to monkey with the message loop...in fact you'll get into trouble doing that.

So what you probably want is something like this:

private void button_Click(object sender, System.EventArgs e)
{
    Cusor oldCursor = Cursor.Current;
    try
    {
        Cursor.Current = Cursors.WaitCursor;
        //
        // Do your lengthly mojo here
        //
    }
    finally
    {
        Cursor.Current = oldCursor;
    }
}

Generalpartially trusted context Pin
ravindra23116-Jul-04 18:01
ravindra23116-Jul-04 18:01 
Generalsend a mms Pin
ashraf_197916-Jul-04 14:28
ashraf_197916-Jul-04 14:28 
GeneralrichTextBox's content Manipulation question Pin
evdoxos16-Jul-04 12:17
evdoxos16-Jul-04 12:17 
GeneralRe: richTextBox's content Manipulation question Pin
evdoxos16-Jul-04 20:55
evdoxos16-Jul-04 20:55 
GeneralGetting Dialog to appear in Office App Pin
Mark Finley16-Jul-04 10:18
Mark Finley16-Jul-04 10:18 
GeneralRe: Getting Dialog to appear in Office App Pin
Mark Finley19-Jul-04 10:24
Mark Finley19-Jul-04 10:24 
GeneralPrintPreviewControl Pin
blankg16-Jul-04 10:02
blankg16-Jul-04 10:02 
GeneralRe: PrintPreviewControl Pin
Dave Kreskowiak17-Jul-04 9:27
mveDave Kreskowiak17-Jul-04 9:27 
GeneralWorker Thread Accessing SQL Server Pin
matthias s.16-Jul-04 9:26
matthias s.16-Jul-04 9:26 
GeneralRe: Worker Thread Accessing SQL Server Pin
partyganger16-Jul-04 9:37
partyganger16-Jul-04 9:37 
GeneralRe: Worker Thread Accessing SQL Server Pin
matthias s.16-Jul-04 9:49
matthias s.16-Jul-04 9:49 
GeneralRe: Worker Thread Accessing SQL Server Pin
Daniel Turini17-Jul-04 9:55
Daniel Turini17-Jul-04 9:55 
GeneralRe: Worker Thread Accessing SQL Server Pin
Nick Parker16-Jul-04 12:54
protectorNick Parker16-Jul-04 12:54 
GeneralPicturebox as a Button!?! Pin
QzRz16-Jul-04 9:11
QzRz16-Jul-04 9:11 
GeneralRe: Picturebox as a Button!?! Pin
LongRange.Shooter16-Jul-04 9:14
LongRange.Shooter16-Jul-04 9:14 
GeneralRe: Picturebox as a Button!?! Pin
QzRz16-Jul-04 9:19
QzRz16-Jul-04 9:19 
GeneralRe: Picturebox as a Button!?! Pin
LongRange.Shooter16-Jul-04 9:36
LongRange.Shooter16-Jul-04 9:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.