首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > PB >

根据字符串窗口名,来关闭一个窗口解决思路

2012-02-03 
根据字符串窗口名,来关闭一个窗口知道一个窗口名,但它是字符串,怎样关闭这个的窗口。用close不行啊,它的参

根据字符串窗口名,来关闭一个窗口
知道一个窗口名,但它是字符串,怎样关闭这个的窗口。用close不行啊,它的参数是windowname类型。

[解决办法]
简单一写,没有 测试

window activesheet,firstsheet
string mtext

firstsheet = w_frame.GetActiveSheet()
if not IsValid(activesheet) then return
activesheet = w_frame.GetActiveSheet()
do while IsValid(activesheet) THEN
if activesheet.Title = "xxxx " then
close(activesheet)
exit
end if
if activesheet =firstsheet then
exit
end if
activesheet = w_frame.GetNextSheet ( activesheet )
END IF

热点排行