I have a thread running in the background. I also have a modeless dialog box running that displays data collected by the Thread.
To get the Xdialog display updated, I use ui_modeless_dlg_refresh() followed by sys_send_keys("{End}").
This works as intended, but it would appear that the whole system is refreshed.
ie if I am currently using another application or even this message-board, the current window is also refreshed and acts as if the {End} key has been pressed in this application as well. Is there a way to stop this.
the {End} key is sent in the Xdialog to put last record into view. If this is the culprit, what would be a way of reseting the Xdialog and going to the {End} of only the Xdialog list?
the full code is thus:
To get the Xdialog display updated, I use ui_modeless_dlg_refresh() followed by sys_send_keys("{End}").
This works as intended, but it would appear that the whole system is refreshed.
ie if I am currently using another application or even this message-board, the current window is also refreshed and acts as if the {End} key has been pressed in this application as well. Is there a way to stop this.
the {End} key is sent in the Xdialog to put last record into view. If this is the culprit, what would be a way of reseting the Xdialog and going to the {End} of only the Xdialog list?
the full code is thus:
Code:
DIM SHARED Var1 as C DIM SHARED varC_result as C IF thread_is_running("sbs_monitor") THEN enable_start = .f. enable_stop = .t. ELSE enable_start = .t. enable_stop = .f. END IF DIM Var1_rl_def as C Var1_rl_def = "kl=sbsmonitor,{keylist_build('H=.030,1:0[],2:10[Reg],3:4[Type]',''+padl(ltrim(str(recno(),7,0)),10,\"0\"),''+padl(ltrim(str(recno(),7,0)),10,\"0\"),left(''+Reg,10),left(''+Icaotypecode,6))}{}" varC_result = ui_modeless_dlg_box("SBS Monitor",<<%dlg% {font=Dotum,8} {can_exit=Close} {interval=60} {timer=refresh} {region} [%@Var1_rl_def%.30,7Recno_Value]; {endregion}; {line=1,0}; <*8Start?enable_start><8Stop?enable_stop><8Close> %dlg%,<<%code% IF a_dlg_button = "Start" THEN IF .not. thread_is_running("sbs_monitor") THEN script_play("SBSMonitorThread") END IF enable_start = .f. enable_stop = .t. END IF IF a_dlg_button = "Stop" THEN IF thread_is_running("sbs_monitor") THEN script_play("stop_sbs_thread") END IF enable_start = .t. enable_stop = .f. END IF IF a_dlg_button = "Refresh" THEN ui_modeless_dlg_refresh("SBS Monitor") sys_send_keys("{End}") END IF IF a_dlg_button = "Close" THEN ui_modeless_dlg_close("SBS Monitor") END IF %code%)
Comment