Mouse click when the application is busy
Whe开发者_JAVA技巧n I click on anywhere on my application when the application is busy it changes the cursor into a generic wait cursor. Is there anyway I can code it for an animated cursor?
This is because you must be doing some heavy operation on main UI thread. Do your processing in background (in separate thread).
You may use BackgroundWorker or Thread class to achieve this.
Windows will always use the generic "busy" cursor if the user tries to interact with it and your application is not responding.
The solution to this is to not do processing on the UI thread - do it on other threads, so your UI remains responsive.
If your UI is still responding, you can set a custom cursor to indicate that your application is busy processing.
if you are using the windows application in ASP.NET then there is a option realted to cursor in properties of the form(nit clearlly remember, it was like wait.cursor). You can use that to display the custom cursor at the time of processing also.
精彩评论