Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Application.ProcessMessages method...

Posted on 1998-09-13
5
Medium Priority
?
182 Views
Last Modified: 2010-04-06
Hi

I have a loop in a form (say Form1) that goes:
 
  while True do
    Application.ProcessMessages;

This allows others things to happen at the same time BUT when I open a MODAL form (ie using Form2.ShowModal), I can't close the form. The OnClose event will not take place unless I terminate the loop in Form1.

How do I solve this problem?, ie to be able to open and close Form2 (as a modal form) with the loop still running in Form1.

Regards
Keith
0
Comment
Question by:keithcsl
  • 2
  • 2
5 Comments
 
LVL 1

Author Comment

by:keithcsl
ID: 1339629
Edited text of question
0
 
LVL 3

Expert Comment

by:Matvey
ID: 1339630
Try maybe Application.HandleMessaage?
0
 
LVL 10

Accepted Solution

by:
viktornet earned 210 total points
ID: 1339631
use this inside your loop.........

break;
//close the form
continue;

Regards,
Viktor Ivanov
0
 
LVL 1

Author Comment

by:keithcsl
ID: 1339632
viktornet

thank you for your answer.

Regards
Keith
0
 
LVL 10

Expert Comment

by:viktornet
ID: 1339633
No prob :-)
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…

876 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question