Forcing a form or screen to update/refresh

Author: (e_darren)


I've had a look around the forums but not found anything that looks related. This is my first post and I'm a relatively inexperienced Uniface developer, so go easy on me please!

During a proc which takes some time to complete, I'd like to update a status/progress bar on the form. As I couldn't find a Uniface progress bar widget, I'm using a an OXC widget called Microsoft ProgressBar Control painted directly onto the form. Although I am updating the widget's value during the proc, it only updates to 100% from 0% once the function has completed - this is obviously not that useful to the user. It appears that the screen will only update once a proc has finished executing and control returns to the form/user input. Is there a way to force a form to refresh during a piece of proc code?

I have tried using asynchronous interupts with UTIMER but these also do not  appear to execute whilst a piece of proc is running.



  1. Hi Darren,

    Your ASYNC way will not work because it will be checked only when the
    structure editor is active again after your code is executed.

    try to add the show-command whenever you update your OXC.

    Success, Uli

    Uniface Help for 8.4.06 reads


    Display a form component.




    Allowed only in form components.


    The show statement displays a form component. All current field values are displayed.

    Return value

    The show statement returns <UPROCERR_STATEMENT> (-1402) if it is used in a service component.

    Example: Redisplaying values as they are updated

    The following example shows the show statement being used to redisplay values in a form as they are updated (that is, while processing continues):

    entry CountDown()
       numeric j

    MyField.MyEnt = 10
    while (MyField.MyEnt > 0)
       j = 10000
       while (j>0)
          j = j - 1
       MyField.MyEnt = MyField.MyEnt - 1


    Author: ulrich-merkel (
  2. Ulrich-merkel,

    Many thanks for the reply, I really appreciate it.

    Seems to work great :) I just hope it won't slow performance much.


    Author: e_darren (
  3. Hi Darren,

    it's just another invocation of the uniface gui-driver (changes only, I assume).

    So in a "normal" C/S environment,
    I never experienced a significant slowdown of performance.

    Success, Uli

    Show was introduced because of com-containers etc.
    because the widgets would have been build after the  edit statement

    It is a "show the actual screen now" so "the Lab" have implemented it for speed.

    Author: ulrich-merkel (
  4. That's great - thanks for the information!


    Author: e_darren (
  5. But we have a progress bar widget, so why make it difficult?

    Author: Theo Neeskens (
  6. We do?! It's not in my widget list. Can we add it via the asn file? I couldn't find any reference to it in the documentation.

    Author: e_darren (
  7. Progress bar is available in V9 (seen in ulibrary.9.4.01), but not in V8 (ulibrary 8.4.06).

    This topic is in folder "Uniface 8", so I assumed darren is looking for a V8 solution.

    But we all should specify the uniface version in question
    more clearly in our posts (perhaps directly in the subject?).

    Success, Uli

    Author: ulrich-merkel (
  8. Sorry, sorry, didn't see this was Uniface 8.
    I allways look at new posts via "What's New", it does show you the name of the forum but it doesn't really stand out.

    Author: Theo Neeskens (
  9. In Uniface 8 you do have the Meter widget.

    It looks quite different

    but if you set up to show values from 0 to 100,

    calculate your progress at certain moments during the process

    and do a "show" at those moments,

    it gives the same functionality.

    Author: Theo Neeskens (
  10. As Theo said:

    without the "show" command, you will not see the meter rise.

    Success, Uli

    Author: ulrich-merkel (