简体   繁体   English

如何在PowerBuidler中使用多线程

[英]How to multithread in PowerBuidler

how can I open a window on a separate thread? 如何在单独的线程上打开窗口?

w_main w_main

open process window btn code: 打开进程窗口的btn代码:

//instance variable
stopper = false

if SharedObjectRegister("w_sep_thread", "SendThread") = success! then
    messagebox('', 'Success')
else
    messagebox('', 'Unsuccessful')
end if

open(w_sep_thread)

stop process btn code: 停止进程btn代码:

stopper = true

w_sep_thread w_sep_thread

start process btn code: 启动进程btn代码:

int i
do while w_main.stopper = false
    sleep(1)
    st_1.text = string(i + 1)
loop

messagebox('', 'Stopped')

If I click the start process btn both the UIs still freeze, but the SharedObjectRegister function returns success 如果单击启动过程btn,则两个UI仍然冻结,但SharedObjectRegister函数返回success

As Chris Pollach says "Mutli-threading in PB would only be done using NVUO's not Window classes". 正如克里斯·波拉赫(Chris Pollach)所说:“ PB中的多线程只能使用NVUO而不是窗口类来完成”。 I hope it helps this thread: click here 我希望它对这个主题有帮助: 单击此处

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM