S
scolemann
Hi all,
I am making a call to a webservice asynchronously, but would still like
to keep a WaitCursor on the screen until the service returns.
Unfortunately, after the initial call made to BeginWebServiceMethod
returns the cursor changes back to the Default cursor. I have tried
setting both Cursor.Current and this.Cursor on the form, but both have
the same behavior.
I tried a workaround someone posted catching WM_SETCURSOR, but it
doesn't work either (code below):
protected override void WndProc(ref Message m)
{
switch ((uint)m.Msg)
{
case Win32.WM_SETCURSOR:
{
if (this.Cursor == Cursors.WaitCursor)
Cursor.Current = this.Cursor;
else
base.WndProc (ref m);
return;
}
}
base.WndProc (ref m);
}
I don't have a full understanding of how windows handles cursors. What
message/event is causing the cursor to return to the Default cursor?
Is there a way I can capture this message and keep it from changing to
the default cursor?
Cole
I am making a call to a webservice asynchronously, but would still like
to keep a WaitCursor on the screen until the service returns.
Unfortunately, after the initial call made to BeginWebServiceMethod
returns the cursor changes back to the Default cursor. I have tried
setting both Cursor.Current and this.Cursor on the form, but both have
the same behavior.
I tried a workaround someone posted catching WM_SETCURSOR, but it
doesn't work either (code below):
protected override void WndProc(ref Message m)
{
switch ((uint)m.Msg)
{
case Win32.WM_SETCURSOR:
{
if (this.Cursor == Cursors.WaitCursor)
Cursor.Current = this.Cursor;
else
base.WndProc (ref m);
return;
}
}
base.WndProc (ref m);
}
I don't have a full understanding of how windows handles cursors. What
message/event is causing the cursor to return to the Default cursor?
Is there a way I can capture this message and keep it from changing to
the default cursor?
Cole