如何获得调用窗口的父窗口?

BenyMo 2001-07-06 12:02:30
如何获得调用窗口的父窗口?
如在A窗口里OPEN(B),那么我如何在了里获得是
A窗口调用它的呢?
...全文
208 11 打赏 收藏 转发到动态 举报
写回复
用AI写文章
11 条回复
切换为时间正序
请发表友善的回复…
发表回复
BenyMo 2001-07-07
  • 打赏
  • 举报
回复
老兄!你们回答就详尽点吧!可否由到写到尾,只给出中间的代码或写两句,你叫我如何看·!·
qqabc 2001-07-06
  • 打赏
  • 举报
回复
非要OK才能给分吗?小气!
nthb2001 2001-07-06
  • 打赏
  • 举报
回复
BenyMo 2001-07-06
  • 打赏
  • 举报
回复
我试一下OK的话就给你分
szjlq 2001-07-06
  • 打赏
  • 举报
回复
b.parentwindow()
tanye 2001-07-06
  • 打赏
  • 举报
回复
lw_frame = lw_parent
do while IsValid (lw_frame)
if lw_frame.windowtype = mdi! or lw_frame.windowtype = mdihelp! then
lb_frame = true
exit
else
lw_frame = lw_frame.ParentWindow()
end if
loop

if lb_frame then
// If MDI frame window is available, use it as the reference point for the popup menu for sheets (windows opened with OpenSheet function) or child windows
if lw_parent.windowtype = child! then
lw_parent = lw_frame
else
lw_sheet = lw_frame.GetFirstSheet()
if IsValid (lw_sheet) then
do
// Use frame reference for popup menu if the parentwindow is a sheet
if lw_sheet = lw_parent then
lw_parent = lw_frame
exit
end if
lw_sheet = lw_frame.GetNextSheet (lw_sheet)
loop until IsNull(lw_sheet) Or not IsValid (lw_sheet)
end if
end if
else
// SDI application. All windows except for child windows will use the parent window of the control as the reference point for the popmenu
if lw_parent.windowtype = child! then
lw_childparent = lw_parent.ParentWindow()
if IsValid (lw_childparent) then lw_parent = lw_childparent
end if
end if
wangsw 2001-07-06
  • 打赏
  • 举报
回复
哈哈,为什么要知道交窗口呀!!
如果真想知道,就那个吧:
OPENWITHPARM()
嘿嘿…………
dotnba 2001-07-06
  • 打赏
  • 举报
回复
同意brightstar(瑞哥哥) 
pbsql 2001-07-06
  • 打赏
  • 举报
回复
对,用OPENWITHPARM()把本窗口名传给被调用的窗口!
szjlq 2001-07-06
  • 打赏
  • 举报
回复
试一下这个:
window lw_parent
lw_parent=w_mdi.GetNextSheet(b)
brightstar 2001-07-06
  • 打赏
  • 举报
回复
szjlq(如果问题继续存在,请与供应商联系)说的不对哦,b.parentwindow() 取的是B的父窗口(如MDI,child,等)而不是调用他的窗口。
干脆用OPENWITHPARM()传个窗口名得了。

1,079

社区成员

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

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