how to show a sandclock cursor over disabled form

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!
 
J

Joe White

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top