Results 1 to 4 of 4

Thread: Confused about showing a second form

  1. #1

    Thread Starter
    Member
    Join Date
    Mar 2004
    Location
    Middle of nowhere
    Posts
    45

    Confused about showing a second form

    Earlier i posted about showing a second form, and was told that using .show was the right way to do it...

    But now im trying to make a second form open on a button click and it isnt working. No debug errors, but when i click the button to open second form it gives me an error like "System.NullReferenceException"

    anyone know how i can fix this?

    codewise i have a public variable...

    Dim open as form2

    and then under the _click method for my button is just

    Open.show()

    What am i forgetting?


    --Flac
    Everything great once started with the words "That will never catch on, you shouldnt even bother" be great, go against the crowed, do something stupid, you might become famous.

  2. #2
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    VB Code:
    1. Dim open as New form2

  3. #3

    Thread Starter
    Member
    Join Date
    Mar 2004
    Location
    Middle of nowhere
    Posts
    45
    Wow, ya, that was the problem. Thanks a lot.
    Everything great once started with the words "That will never catch on, you shouldnt even bother" be great, go against the crowed, do something stupid, you might become famous.

  4. #4
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    np , that needs a lot of reading because .NET work that way .

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