Hello,
In some long running processes how can I lock the main window so no controls can be clicked on until my process is done?
I could individually disable all the controls but some controls I am using do not have a Enabled property. In Visual Basic I'd simply lock the window then unlock it until the freeze was over. I may have needed an API function to do this back in VB.
Does a Progress Bar control stop users from clicking on all other controls on a window?
What method do you use when doing these type operations where you want to stop anyone from being able to click on a control?
Thanks,
Michael
Lock App Window
Moderator: Rathinagiri
Re: Lock App Window
Create simple modal window wirh label "Please wait until process ends..." with no title bar.
After finishing your function, release this window.
After finishing your function, release this window.
-
- Posts: 119
- Joined: Wed Feb 18, 2009 2:14 pm
Re: Lock App Window
I found the WAIT WINDOW example that that works perfect.
Thanks!
Thanks!
- srvet_claudio
- Posts: 2193
- Joined: Thu Feb 25, 2010 8:43 pm
- Location: Uruguay
- Contact:
Re: Lock App Window
See:
Code: Select all
<FormName>.Enabled := .F.
...
<FormName>.Enabled := .T.
-
- Posts: 682
- Joined: Tue Jun 04, 2013 6:33 pm
- Location: Argentina
Re: Lock App Window
Hi Melliot:
I use another option: i create a Window MODAL where i put - as your example - a progress bar control.-
Modal window must be defined with this properties:
NOSIZE ;
NOSYSMENU ;
NOCAPTION ;
This way you en user only see progress bar and wait till it ends meanwhile he can't do anythings.-
When progressbar or any process end, the window MODAL must be closed and end user returns to controll the app.-
Hopping this helps you.
With regards.
Eduardo
I use another option: i create a Window MODAL where i put - as your example - a progress bar control.-
Modal window must be defined with this properties:
NOSIZE ;
NOSYSMENU ;
NOCAPTION ;
This way you en user only see progress bar and wait till it ends meanwhile he can't do anythings.-
When progressbar or any process end, the window MODAL must be closed and end user returns to controll the app.-
Hopping this helps you.
With regards.
Eduardo
-
- Posts: 119
- Joined: Wed Feb 18, 2009 2:14 pm
Re: Lock App Window
The Modal Window as you guys described is the best method I think.
I implemented the WAIT WINDOW because it was the quickest route but will change it accordingly. The modal window, as you guys described, will look more professional.
The WAIT WINDOW is pretty cool. Just wish it had more options.
Thanks!
I implemented the WAIT WINDOW because it was the quickest route but will change it accordingly. The modal window, as you guys described, will look more professional.
The WAIT WINDOW is pretty cool. Just wish it had more options.
Thanks!