Página 1 de 1
Temporary disable ProcessMessages
Publicado: Lun Nov 28, 2016 3:35 pm
por emeasoft
Hello Xailers,
Is there any way to temporary disable the ProcessMessages function?
Something like the property lAllowProcessMessages from MariaDB.
Thanks,
Juliano
Re: Temporary disable ProcessMessages
Publicado: Lun Nov 28, 2016 8:38 pm
por ignacio
Hello,
I'm afraid is not possible, sorry. If you need to avoid the use of certain operations, like form closing or button pressed in the middle of a process. I suggest you use the following techniques:
1) Use a private data member lWorking that becomes true when you are in the process.
2) Use a private data member lCloseRequested that any button may change it to true in the process loop.
3) Check on your loop the value of lCloseRequested, to exit from it if becomes true.
4) Disable all the controls you do not want the user can touch.
5) Reject the form closing using its OnClose event and checking if lWorking is true.
Regards,
Re: Temporary disable ProcessMessages
Publicado: Mar Nov 29, 2016 1:49 pm
por emeasoft
Hello Ignacio,
I will try with one of this solutions.
Many thanks!
Re: Temporary disable ProcessMessages
Publicado: Mié Nov 30, 2016 9:56 am
por ignacio
You should use the five proposals at the same time.
Regards
Re: Temporary disable ProcessMessages
Publicado: Jue Dic 01, 2016 12:58 pm
por emeasoft
Thanks Ignacio,
Most of them we already use, I am going to test adding the other ones.
Regards,
Juliano