CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: Arjay

Search: Search took 0.14 seconds.

  1. Replies
    39
    Views
    76,704

    Re: How to UseWaitCursor correctly

    I just renamed them by prepending an '_' to the existing variables. That way I could see identify them as a class field rather than a method param or local variable.

    I think I commented it, but...
  2. Replies
    39
    Views
    76,704

    Re: How to UseWaitCursor correctly

    The main problem was you were blocking the main UI thread by waiting on an event. I removed the DoEvent( ) hacks because they aren't necessary.

    I also restructured the code to use a modeless...
  3. Replies
    39
    Views
    76,704

    Re: How to UseWaitCursor correctly

    Is the attached project code up to date? If not, updated it and I'll take another look at it.

    As compared to C#, working in managed C++ is a real PITA, so I want to be sure the latest is posted...
  4. Replies
    39
    Views
    76,704

    Re: How to UseWaitCursor correctly

    Not sure where you're putting the following code



    One problem you have is that csrSaved needs to be a class field, saved off in the DoCount and restored in the RunWorkerCompleted.

    ...
  5. Replies
    39
    Views
    76,704

    Re: How to UseWaitCursor correctly

    Before starting the worker thread, just save off the current cursor (using the Form's Cursor property) and set the new cursor.

    When you receive the thread complete (or abort method), restore the...
  6. Replies
    39
    Views
    76,704

    Re: How to UseWaitCursor correctly

    That should always be your first attempt at solving the problem. More often than not, you can find the answer yourself.

    I haven't looked at your code because I don't have VS2010 handy right now. ...
  7. Replies
    39
    Views
    76,704

    Re: How to UseWaitCursor correctly

    Zip up the project and include any data files. Also include what is ocurring and what you expect.
  8. Replies
    39
    Views
    76,704

    Re: How to UseWaitCursor correctly

    It depends on the 'severity' of what happens if the user cancels. If the user can restart the operation easily enough and the operation doesn't take much time, then you don't need the "are you sure"...
  9. Replies
    39
    Views
    76,704

    Re: How to UseWaitCursor correctly

    The screen shot doesn't already have a cancel button. What you have is a close button (i.e the 'X' button). You can disable the 'X' button. Not sure how off the top of my head, but I'll look in...
  10. Replies
    39
    Views
    76,704

    Re: How to UseWaitCursor correctly

    Just add a Cancel button to the progress dialog. If the user presses the cancel button or the close 'X' button, ask the user of they wish to cancel the operation. If the operation is such that...
  11. Replies
    39
    Views
    76,704

    Re: How to UseWaitCursor correctly

    You need to solve the basic problem of all apps that perform long running cpu intensive operations - that is, how to keep the UI responsive.

    The quick and dirty, tightly coupled difficult to...
Results 1 to 11 of 11





Click Here to Expand Forum to Full Width

Featured