Hi ... I need to do a form with one button when I click the button (form1 will Hide) and (form2 will Show) ????
I tried form2.show() didn't work?
Can anyone tell me the code.
Printable View
Hi ... I need to do a form with one button when I click the button (form1 will Hide) and (form2 will Show) ????
I tried form2.show() didn't work?
Can anyone tell me the code.
here you go ....
Thanks alot it's work :)
Can you tell me what is that mean ...
Dim frm2 As New Form2()
this means :Quote:
Originally posted by Roomi7
Thanks alot it's work :)
Can you tell me what is that mean ...
Dim frm2 As New Form2()
basically , you're instantiating a new object to have full control on it which inherits almost all the methods ,classes ,properties of that object.
(acually I'm lost when it comes to teaching ....hate palying a teacher role . lol :D
got it ??:p
check this link for more info about it .....
summary :Quote:
Originally posted by Roomi7
Thanks alot it's work :)
Can you tell me what is that mean ...
Dim frm2 As New Form2()
you are creating new object which is "frm2" from the current object which is "Form2". frm2 is almost exactly the same as form2.
VS.NET is based on this technology (inheritance) . all objects(controls , classes,methods) are inherited from their parents or Classes.
I'm afraid you're not getting it though..;)
I got 96% :) ... it like I'm doing the same as with form2 direct coz it's almost the same but :)
why I'm using NEW why I can't just use
Dim frm2 As Form2
Well , try something like this
dim frm as form2 . what result would you get ? ofcourse stupid error msg saying "Object Reference not set to an instance of an object".Then you have to use keyword "New" to instantiate new object.
so you can't use that object itself or otherwise you can make an exact copy of it for unrestricted uses(with no errors). got it :p