最近在用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