首页 > 其他分享 >PowerBuilder下的不同页面传参

PowerBuilder下的不同页面传参

时间:2023-03-14 09:46:49浏览次数:40  
标签:传参 old string PowerBuilder openwithparm 参数 new 页面

PB9.0下如何在两个不同页面传递参数

源码代码位置:https://github.com/Glandom/PowerBuilder9.0Projects

1..通过openwithparm(w_new,l_old)函数传递,Message.StringParm()函数接受参数

  1. 首先创建一个w_old 窗口,添加一个                                                                                                                                               

   在传递参数的按钮处添加处理函数:

 string l_old   //定义string类型变量
 l_old = sle_1.text  //用来储存sle_1的文本内容
 openwithparm(w_new,l_old)  //通过openwithparm('传递到的窗口','传递参数')函数。传参
  1. 创建一个w_new 窗口,添加一个

在w_new窗口的open()函数添加方法:

 string l_new  //定义变量接收传过来的参数
 l_new = Message.StringParm   //这样就接收到了你要的参数了。
 MessageBox('成功接受参数',l_new)  //使用MessageBox()提示接收成功
 st_showtext.text = l_new   //将接受的参数在新窗口展示
  1. 在globalvariable文件内写入 Open(w_old) 。

  2. 点击运行。

   其余待更新...

标签:传参,old,string,PowerBuilder,openwithparm,参数,new,页面
From: https://www.cnblogs.com/zy-feng/p/17213775.html

相关文章