下面的代码打开四个窗口,其中被打开的窗口名称存放在字符变量中;
你要打开不同的窗口只需要改变字符变量的值就可以了;
window w_stock_win[ ]
string ls_stock_type[4]
ls_stock_type[1] = "w_stock_wine "
ls_stock_type[2] = "w_stock_scotch "
ls_stock_type[3] = "w_stock_beer "
ls_stock_type[4] = "w_stock_soda "
FOR n = 1 to 4
//该语句执行后,w_stock_win[n]的窗口从ls_stock_type[n]变量中指定的窗体创建
Open(w_stock_win[n], ls_stock_type[n])
NEXT
posted on 2010-06-16 20:08
Ke 阅读(2575)
评论(0) 编辑 收藏 所属分类:
powerBuilder