Results 1 to 7 of 7

Thread: Show Hide Form????

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2003
    Location
    Kuwait
    Posts
    10

    Question Show Hide Form????

    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.

  2. #2
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    here you go ....
    Attached Files Attached Files

  3. #3

    Thread Starter
    New Member
    Join Date
    Jan 2003
    Location
    Kuwait
    Posts
    10

    Thumbs up

    Thanks alot it's work


    Can you tell me what is that mean ...

    Dim frm2 As New Form2()
    Last edited by Roomi7; Jan 22nd, 2003 at 04:26 PM.

  4. #4
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Originally posted by Roomi7
    Thanks alot it's work
    Can you tell me what is that mean ...
    Dim frm2 As New Form2()
    this means :
    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
    got it ??
    check this link for more info about it .....

  5. #5
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Originally posted by Roomi7
    Thanks alot it's work

    Can you tell me what is that mean ...

    Dim frm2 As New Form2()
    summary :
    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..

  6. #6

    Thread Starter
    New Member
    Join Date
    Jan 2003
    Location
    Kuwait
    Posts
    10
    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

  7. #7
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width