Refreshing screen during run-time

Posted by Marc on 15-Mar-2016 09:02

Hi all,

Does anyone know how to make my windows form refresh during runtime ?

I'm wonder how to make a progress bar or how to write something on my form while performing a for each for intance...

I know Openedge is able to manage only one thread, but He probably can't wait for the UI to refresh it-self no ?



All Replies

Posted by Marco Mendoza on 15-Mar-2016 09:09
Posted by Marc on 15-Mar-2016 09:17

Perfekt ;) Thanks Marco :)

Posted by Lieven De Foor on 16-Mar-2016 11:06

Watch out using PROCESS EVENTS, as that will process ALL UI events, including those you're not anticipating (e.g. the user closing a screen while the FOR loop is running etc.).

Have a look at SESSION:MULTITASKING-INTERVAL as well, though it might not be exactly what you're looking for...

Posted by keithg on 22-Mar-2016 12:24

You can experiment with some WinAPI calls.  Look at this page:

Search for the calls to "InvalidateRect".  

"LockWindowUpdate" might be useful, too.  Note that you have to call it twice.  Once, using the HWND of the frame in question, then a second time passing a zero to undo the previous update lock.  I've used this one to disable screen updates for a frame, then reenable it again after some processing has completed.  For things like deleting a number of browse rows one by one, this API call can noticeably speed up the performance of your screen.

This thread is closed