Solved

Application.ProcessMessages method...

Posted on 1998-09-13
5
166 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 70 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

773 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