paulaa Level: Professor

 Registered: 10-08-2003 Posts: 97
|
creating forms at runtime. whoa.
hi.
i'm making a program. in the program i require forms to be created at runtime, and all made similar to another form which i'll create at design time.
also, once these forms have been created i need to change a couple of properties on them, and the text displayed in a label, which will be on the form
i looked at this code from another post, but i don't know how to change it to create forms. not sure if it's even possible using this method.
Option Explicit
Dim WithEvents txtBox As TextBox
Private Sub cmdAdd_Click()
' Add a TextBox
Set txtBox = Controls.Add("VB.TextBox", "txtBox", Me)
' Place it where you want
txtBox.Move 100, 100, 3300, 330
' Set it visible
txtBox.Visible = True
End Sub
Private Sub cmdRemove_Click()
'Controls.Remove txtBox
End Sub |
ta in advance 
Paul
[Edited by paulaa on 10-05-2004 at 09:47 PM GMT]
____________________________
My Homepage
|