怎样能快速找到窗体在哪个pbl下

liubocy 2005-06-22 03:40:05
如题
...全文
114 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
yzip 2005-06-23
  • 打赏
  • 举报
回复
以下代码可以搜索出所有的window,修改一下,可以按照每个PBL,对应一个窗口列表,然后在字符串中查找就很快了,我用来定位PBL中有没有对应的窗口,进行错误处理:
of_getwins()
string ls_liblist,ls_libs[]
string ls_wins[],ls_tmp,ls_null[]

long i,ll_cnt,j,ll_pos
n_cst_string lnv_string
ls_liblist = getlibrarylist()
lnv_string.Of_ParseToArray(ls_liblist,',',ls_libs)
ll_cnt = upperbound(ls_libs)
If ll_cnt = 0 then Return 0
is_wins = ''
For i=1 to ll_cnt
ls_wins = ls_null
ls_tmp = LibraryDirectory(ls_libs[i],DirWindow!)
if ls_tmp <> '' and not isnull(ls_tmp) then
lnv_string.Of_ParseToArray(ls_tmp,'~n',ls_wins)
if upperbound(ls_wins) = 0 then continue
FOR j=1 to upperbound(ls_wins)
ll_pos = pos(ls_wins[j],'~t')
if ll_pos > 0 then
is_wins+=left(ls_wins[j],ll_pos - 1)+ ','
end if
next
end if
Next

Return 1

/////////////////////////////////
Of_checkwin(string as_winname ,string as_window)
//判断系统中是否存在该窗口
long ll_find
if is_wins <> '' then
ll_find = pos(lower(is_wins),lower(as_window))
If ll_find = 0 then
messagebox('系统代码错误','程序代码中不存在该窗口,~r~n请检查程序代码或数据库配置!~r~n~r~n窗口名:'+as_winname + '~r~n对象名:' + as_window,Information!)
Return -1
end if
Else
Return 1
end if

Return 1
liubocy 2005-06-23
  • 打赏
  • 举报
回复
查了哈,smartjump不是主板超频工具吗?
j9dai 2005-06-22
  • 打赏
  • 举报
回复
没研究过类似问题,友情UP
li_d_s 2005-06-22
  • 打赏
  • 举报
回复
有个免费的smartjump工具可以用,能快速定位的
velen 2005-06-22
  • 打赏
  • 举报
回复
pb版本不同而不同.

1,075

社区成员

发帖
与我相关
我的任务
社区描述
PowerBuilder 相关问题讨论
社区管理员
  • 基础类社区
  • WorldMobile
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧