I am trying to create a form programatically from a existing form. Is there a way in which I can do it without inserting another form as a instance with just one form say form1 at runtime. I want to display the form with a populated checkboxes
Asked
Active
Viewed 897 times
0
-
You mean `Dim f = New Form1()`, or is about some complex templating scenario? – GSerg Oct 14 '16 at 20:30
-
yeah something like that but I need form that is not an instance of form1, I want it like a completely new form. I just have one form : form1 in my solution explorer. I don't want to insert another form but create it and destroy that form in runtime – gowww Oct 14 '16 at 20:32
-
1`Dim f = New Form1()` *is* a completely new form – Ňɏssa Pøngjǣrdenlarp Oct 14 '16 at 20:34
-
1You want a form that looks like Form1 but is not called Form1? Why? How is it different from [creating an instance](http://stackoverflow.com/a/6049062/11683) of Form1? – GSerg Oct 14 '16 at 20:35
-
Its like drawing. Not the instance of first form. – gowww Oct 14 '16 at 20:36
-
1If it is created " from a existing form" it is not "a completely new form". What you want is not clear at all – Ňɏssa Pøngjǣrdenlarp Oct 14 '16 at 20:39
-
2Please click that link above @GowtamaKrishna. I have a feeling that you're not aware you could create different instances of the same Form class, as opposed to referring to a precreated instance by the class name in the VB6 style. – GSerg Oct 14 '16 at 20:41
-
yes. different instance of same form works smooth. thanks. @GDerg – gowww Oct 15 '16 at 17:31
-
Dim f = New Form1() i can move forward from here @Plutonix. :) – gowww Oct 15 '16 at 17:32