举个例子,你用midi,然后设计期间做一个样板窗体(modelform),以后想在运行期间添加这种窗体的话:dim
newform
as
new
modelform
先新建窗体2,工程--添加窗体Form1:
Public a As String
Public b As String
Private Sub Command1_Click()
a = Text1.Text
b = Text2.Text
Form2.Show
End Sub
Form2:
Private Sub Form_Load()
Print Form1.a &"爱" &Form1.b
End Sub
'特别的是,FORM2的AUTODRAW属性要设为TRUE
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)