Can improve the performance of Xdialogs.


All controls on an Xdialog can have an "enabled" expression (e.g. ). some controls can also have a "checked" expression. If these expressions are dependent on variables whose values are set outside the dialog box, then a5 can update the state of all of the expressions that are based on these external variables during it idle cycle.

Using the {AUTO_EXTERNAL_REFRESH} command in a modeless Xdialog can improve the performance of the Xdialog. I.e. buttons that should become enabled or disabled because some external event has occurred, will change their state more quickly.


Assuming that the values of Enable_Button_1 and Enable_Button_2 were modified outside of this modeless dialog, then the {AUTO_EXTERNAL_REFRESH} command would improve the dialog's response when they changed.

dim global Enable_Button_1 as L
dim global Enable_Button_2 as L
Enable_Button_1 = .T.
Enable_Button_2 = .T.
ui_modeless_dlg_box("Auto External Refresh", <<%dlg%
<20,3Close!B1?Enable_Button_1> {sp} <20,3Open!B2?Enable_Button_2>;
%dlg%, <<%code%
if a_dlg_button = "B1" then
    ui_modeless_dlg_close("Auto External Refresh")
end if
if a_dlg_button = "B2" then
    'do something
end if


Desktop applications only

See Also