实现窗口间的参数传递

[入库:2005年8月18日] [更新:2007年3月24日]

本文简介:选择自 newstar2002 的 blog

最近在用powerbuilder开发程序觉得其中的openwithparam()函数很好用

在vb中实现起来也很简单
建立一个模块加入如下代码:
sub openfromwithparam(byval str as string)
        dim form as form2
        set form = new form2
        form.str = str
         form.label1.caption = form.str
        
          form.show
end sub
form1代码如下:
private sub command1_click()
      call openfromwithparam("liyong")
end sub

private sub form_load()

end sub

form2代码:

public str as string

private sub form_load()

end sub

 

本文关键:参数传递
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top