0

当我按下窗口中的按钮时,我需要显示“正在加载...”。我怎样才能做到?如果是流式的,就像点点滴滴一样,那就更好了。

我只是尝试使用包含单词“Loading...”作为FileOpenex()函数的 .txt 文件,但它不起作用..


integer li_FileNum
string ls_Emp_Input
li_FileNum = FileOpen("C:\Users\Exactus\Desktop\New.txt", &
TextMode!)
FileReadEx(li_FileNum, ls_Emp_Input)
4

2 回答 2

1

全局变量:

integer  gi_max_dots=7;
string  gs_dots;

您可以timer()在窗口上使用预定义的事件。当你想要这个开始时,把

timer(1); //This will trigger timer  after each second interval 
          //so try changing the loading text there.

timer()在事件中使用此代码应该可以工作:

if  gi_max_dots > len(gs_dots)  then 
    gs_dots=gs_dots+".";
else
    gs_dots="";
end if

我假设一个静态文本控件在此处显示此状态。

st_1.text="Loading"+gs_dots;

以及何时需要停止定时器事件

Timer(0);
st_1.text="";
于 2016-11-08T13:32:41.383 回答
0

创建一个弹出窗口,其中包含文本 Loading ... 当您按下按钮打开窗口并在进程结束时关闭。

于 2016-11-08T11:14:18.513 回答