hourglass/circle thingy (2 Viewers)

bigdude

Portal Member
September 28, 2007
16
1
Home Country
United States of America United States of America
Silly questions...

I would like to use this cursor in a plugin.
In C# code how do I bring up this cursor (and how do I get rid of it once the action is complete) ?
Do I need a particular Using statement or reference for it ?

EDIT:
OK. I figured out how to start this thing and stop it, but I now have a new question. I start it and go off to do a time consuming activity, but because a large part of that process is waiting for network responses the UI and wait cursor are starved and the UI appears to freeze. The waiting code looks like this:

// Telnet: wait for response
timeout = 0;
while (tnResponse == "" && timeout < 90000 && !tnResponse.Contains("Selected chang"))
{
System.Threading.Thread.Sleep(300);
timeout = timeout + 300;
}
System.Threading.Thread.Sleep(100);

the code works, but is there something I can add to the wait loop to let the UI and wait cursor 'breathe' ?

If not, could someone post a simpe example of how to make a function run in a thread of its own and then return to the original execution path... (I assume that would be the only other choice) ?
 

Users who are viewing this thread

Top Bottom