Working with form class collection <Solved!>
I am new to vb.net, previous just an asp guy.
I would like to create a startup form that displays a list box of all available forms and then by pressing a button, displays the form selected in the list box. This just helps the process of reviewing the UI of each form.
This is not as easy as it sounds because there is not a forms collection. I have a couple of questions/thoughts:
1) Forms are just classes in vb.net so there must be a way to loop through the classes and find ones whose names start with frm. Not elegant, but might work.
2) I have the following code behind a button that is related to a text box
---------------------------------------------------
Dim frmName As String
Dim T As Type
'Get form Name, put project name in front
frmName = "prj_New_Project." & Me.txbx_Form_Name.Text
T = GetType(frmName)
Dim F As Form = Activator.CreateInstance(T)
F.Show()
-------------------------------
There is a build error that says 'Type frmName is not defined'.
3) Does anyone know how to get this to work?
Thanks