how to show a sandclock cursor over disabled form

  • Thread starter Thread starter Andi Lehr
  • Start date Start date
A

Andi Lehr

hello,

I'd like to show a sandclock cursor over a disabled form,
but when I set Enabled=false for the Form, the cursor
jumps back to be the default.

Cause: I do long lasting database activity in one
background thread and show a ProgressBar + sandclock from
another background thread meanwhile.
I need to disable the form, otherwise the user clicks
everywhere with the sandclock mouse, which I want to
prevent.
If I run the progressbar in the GUI thread, the click
events are collected in the event message queue and I
can't empty the queue, so the events get processed after
the background threads finish.

Tanks for any help!
 
Have you tried putting a panel on the form, setting the panel's Dock to
Fill, and putting all your controls on the panel instead of directly on
the form? Then you should be able to disable just the panel, and your
hourglass cursor should still show up. If your form has menus, you
would have to disable and re-enable the menu items as well.
 
Back
Top