Board index » delphi » Windows doing thing in different order ?

Windows doing thing in different order ?

Hi Folks,

      Is there any way to force windows to do things in
the order that they are listed in my delphi (I) programme.

I have a printer button that, when pressed, puts a message
on the form and then goes off and does some printing. The
printing is a bit slow ....

I find that windows sets off to do the printing, get the data,
starts printmanager etc BEFORE we see the message on screen !
(the message says, 'printing, please wait ....') !!!

Any way to force the screen update before Windows gets
bogged down doing the next job ???

--
------------------------------------------------------------
David Bannon                      D.Ban...@latrobe.edu.au
School of Biochemistry            Phone 61 03 9479 2197
La Trobe University, Plenty Rd,   Fax   61 03 9479 2467
Bundoora, Vic, Australia, 3083    http://bioserve.latrobe.edu.au
------------------------------------------------------------
..... Humpty Dumpty was pushed !

 

Re:Windows doing thing in different order ?


Use the Repaint method of the Form.  This will force the form to repaint
the invalidated section containing the message.

--
Mark Pritchard
-------------
http://www.ozemail.com.au/~pritchma

David Bannon <D.Ban...@latrobe.edu.au> wrote in article
<53i6ou$...@news.latrobe.edu.au>...

Quote
>       Is there any way to force windows to do things in
> the order that they are listed in my delphi (I) programme.

> I have a printer button that, when pressed, puts a message
> on the form and then goes off and does some printing. The
> printing is a bit slow ....

> I find that windows sets off to do the printing, get the data,
> starts printmanager etc BEFORE we see the message on screen !
> (the message says, 'printing, please wait ....') !!!

Re:Windows doing thing in different order ?


In article <53i6ou$...@news.latrobe.edu.au>, D.Ban...@latrobe.edu.au

Quote
(David Bannon) writes:
>Hi Folks,

>      Is there any way to force windows to do things in
>the order that they are listed in my delphi (I) programme.

>I have a printer button that, when pressed, puts a message
>on the form and then goes off and does some printing. The
>printing is a bit slow ....

>I find that windows sets off to do the printing, get the data,
>starts printmanager etc BEFORE we see the message on screen !
>(the message says, 'printing, please wait ....') !!!

>Any way to force the screen update before Windows gets
>bogged down doing the next job ???

application.processMessages

This releases control to windows to handle any pent up messages, such as
the display of your message on the screen.

A good thing to sprinkle through code that doesn't seem to be doing things
in the proper order...

Other Threads