Board index » delphi » A simple question of Modal Forms

A simple question of Modal Forms

My question is maybe silly

I need to open a form (Modal form) showing a message while my program is
making some proccess (open databases). When the database is open, the
message form must close. Sometimes the process takes some seconds and
sometimes is too fast.

I ve tried with

Form.ShowModal
Application.ProcessMessages

but my form never is displayed.

What is the code for do it ?

--
Alejandro Castro
www.calfra.com.mx
alejan...@alfra.info

 

Re:A simple question of Modal Forms


Quote
In article <3c789dc6$1_2@dnews>, Alejandro Castro wrote:
> My question is maybe silly
> I need to open a form (Modal form) showing a message while my program is
> making some proccess (open databases). When the database is open, the
> message form must close. Sometimes the process takes some seconds and
> sometimes is too fast.

> I ve tried with

> Form.ShowModal
> Application.ProcessMessages

Well, that cannot work since the ShowModal call will not return until the
form has been closed. Use something like

  messageform.Show;
  try
    messageform.Update;
    ...do lengthy task
  finally
    messageform.close
  end;  

--
Peter Below (TeamB)  100113.1...@compuserve.com)
No e-mail responses, please, unless explicitly requested!
Use the newsgroup archives :
http://www.mers.com/searchsite.html
http://www.tamaracka.com/search.htm
http://groups.google.com
http://www.prolix.be

Other Threads