Friday, July 25, 2014

Wait cursor in Window CE

Wait cursor in Window CE
Wait cursor is used in Windows mobile to makes the user to wait until the current action 
gets completed.
Of course its a 2 lines of code but I have seen many to struggle to know How to acheive.
Let us glance on the simple code.
try
{
Cursor.Current = Cursors.WaitCursor;

//Business Logic
//Business Logic
//Business Logic
}
catch
{
 Cursor.Current = Cursors.Default; //before make it Default
 //pop up Mesage
}
finally
{
Cursor.Current = Cursors.Default;
}

Note: Make sure to make it Default as soon as the process Stop else wait cursor continues.
Wait cursor differs in image with respect to each windows mobile.

No comments: