Re: Disabling an application during a file save?
- From: Jamie <jamie_ka1lpa_not_valid_after_ka1lpa_@xxxxxxxxxxx>
- Date: Wed, 11 Oct 2006 12:19:41 -0700
Rob Kennedy wrote:
Hans-Peter Diettrich wrote:hmm, whats wrong with the EnableWindow(WindowHandle, false) ?
Steve wrote:
Some of the buttons call a procedure which writes some data to disk.
This process occasionally takes a few seconds. Is there a way to
prevent any other buttons/actions being acting on while it's saving?
That's already the normal behaviour. As long as you don't call ProcessMessages in an event handler, no other events can occur during execution of the handler.
But the application will still accumulate the mouse and keyboard messages. They just won't be handled until after the disk operation returns. Steve wants that the program will _ignore_ the events, not _delay_ them. Disabling a form accomplishes that.
DisableTaskWindows might be a way of disabling all the forms in one call. It's designed to disable everything in order to make one particular window modal, so it might not work quite right when there isn't really any modal form. It's worth a try, though.
that will ignore all input activities.
--
Real Programmers Do things like this.
http://webpages.charter.net/jamie_5
.
- Follow-Ups:
- Re: Disabling an application during a file save?
- From: Rob Kennedy
- Re: Disabling an application during a file save?
- References:
- Disabling an application during a file save?
- From: Steve
- Re: Disabling an application during a file save?
- From: Hans-Peter Diettrich
- Re: Disabling an application during a file save?
- From: Rob Kennedy
- Disabling an application during a file save?
- Prev by Date: Re: Disabling an application during a file save?
- Next by Date: Re: Disabling an application during a file save?
- Previous by thread: Re: Disabling an application during a file save?
- Next by thread: Re: Disabling an application during a file save?
- Index(es):