
load another form form one form
That is exactly correct, and it's actually not much different than VB-6. In
VB-6 the second form did not display until you used an instruction such as
Form2.Show. If the VB runtime detected a reference to a form that did not
yet exist, then it silently executed the equivalent of dim <form2> as New
Form2 (where <form2> is some magic internal reference that allowed you to
refer to the instance of Form2 as 'form2'). Now the variable declaration and
instantiating the object is up to you, and you must do it before attempting
any reference to Form2 or any of its objects.
Quote:
> Thanks all for your posts. I think I have something confused. Now I am
> cleared.
> One thing I confused is that when I add a windows form by clicking
> project->add windows form, actually, it adds a class; after I run the
> project, there is no instance for the form2 class created, only one
instance
> of form1 is created by default, so of course I need to use new keyword to
> create a new instance.
> So I know now add a windows form actually create a class;
> If I am wrong, please let me know. Thank you.