Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Application.ProcessMessages method...

Posted on 1998-09-13
5
Medium Priority
?
178 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

715 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