[2005] access form by variable or mdichildren
hello all. If i have name of form(frm1) in a variable (frm_str as string), can i access to the variable like the form? or if i already know the parent of frm1, can i access to it by mdichildren?
Ex:
Code:
dim frm_str as string
frm_str=frm1.name
...
...
...
...
...
frm_str.Show 'this is frm1 actually
or
dim frm_str as string
frm_str=frm1.name
frm1.mdiparent=MainForm
...
...
...
...
...
MainForm.MdiChildren(frm_str).show
any idea? many thank for ur help.
Re: [2005] access form by variable or mdichildren
Hi...why dont you just make a simple application and run it.
You will know whether that compiles properly or not.
Lol,
Sid.
Re: [2005] access form by variable or mdichildren
Why do you have a String variable referring to the Name of the form? Why don't you have a Form variable referring to the form itself?
Re: [2005] access form by variable or mdichildren
thank u for ur reply. Anyway can i do that?
Re: [2005] access form by variable or mdichildren
Just create an instance of the form class
Try this ::
Dim objform as new Form1()
objform.show()