none
Wait Cursor related to a form opened as dialog RRS feed

  • Question

  • I've got a main form and open up another form with a new instance of the form.   I've tried putting Cursors.WaitCursor in many places but never see the waitcursor on the screen.  Are there rules such as the waitcursor can't be called in a form that is opened as a dialog?  

    TIA

    Harry

    Wednesday, September 11, 2019 12:32 PM

Answers

  • No, there are no such rules.

    But: The events where you may have placed them and then reset the cursor may simply fire so fast that there is no time to draw the cursor or that the order of events prevent a normal redraw.

    Here you need always to enforce redrawing of the entire application whenever you changed the cursor to the hourglass symbol.

    • Marked as answer by Mimosa Arts Wednesday, September 25, 2019 12:32 PM
    Wednesday, September 11, 2019 1:09 PM
  • I abandoned the wait cursor idea but found what the problem was.  My code was going out and doing some intensive activity and the form was waiting on that and then when that processing was finished it would very fast show/hide wait cursor finally.

    I changed to a wait label and added lblWait.Refresh();

    Which showed the label immediately.  

    Problem solved.

      
    • Marked as answer by Mimosa Arts Wednesday, September 25, 2019 12:33 PM
    Wednesday, September 25, 2019 12:32 PM
  • Thus exactly what I said: The order of events is not what you've expected ;)
    • Marked as answer by Mimosa Arts Thursday, September 26, 2019 6:38 PM
    Wednesday, September 25, 2019 3:27 PM

All replies

  • No, there are no such rules.

    But: The events where you may have placed them and then reset the cursor may simply fire so fast that there is no time to draw the cursor or that the order of events prevent a normal redraw.

    Here you need always to enforce redrawing of the entire application whenever you changed the cursor to the hourglass symbol.

    • Marked as answer by Mimosa Arts Wednesday, September 25, 2019 12:32 PM
    Wednesday, September 11, 2019 1:09 PM
  • I abandoned the wait cursor idea but found what the problem was.  My code was going out and doing some intensive activity and the form was waiting on that and then when that processing was finished it would very fast show/hide wait cursor finally.

    I changed to a wait label and added lblWait.Refresh();

    Which showed the label immediately.  

    Problem solved.

      
    • Marked as answer by Mimosa Arts Wednesday, September 25, 2019 12:33 PM
    Wednesday, September 25, 2019 12:32 PM
  • Thus exactly what I said: The order of events is not what you've expected ;)
    • Marked as answer by Mimosa Arts Thursday, September 26, 2019 6:38 PM
    Wednesday, September 25, 2019 3:27 PM