Put an IncMouse at begininning of procedure and a decmouse juts before exit (take care on early/conditional exits ). Note that when you set the Application.UseWaitCursor property, it overrides any settings you made on the UseWaitCursor property for any control or form in your application. If your operation blocks input not just in one window but for your entire application, you can set the Application.UseWaitCursor static property to true: Application.UseWaitCursor = true This shows the wait cursor for the specified Form or Control and all its child controls until you set the UseWaitCursor property to false. UseWaitCursorĪ much better way to show the Wait cursor is to set the UseWaitCursor property in a form to true: form.UseWaitCursor = true This may confuse the user into thinking the operation has completed when in fact it’s still running. Other programs or controls within your program can easily reset the cursor back to the default arrow: The problem with this approach is it temporarily sets the Wait cursor, but doesn’t ensure that the Wait cursor shows until the end of your operation. Here is how the Wait cursor appears in Windows Vista:īut developers often go about this the wrong way by setting the Cursor.Current property as follows: Cursor.Current = Cursors.WaitCursor It’s common UI courtesy to show the Wait cursor when performing a long operation that requires the user to wait.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |