Results 1 to 6 of 6

Thread: Simple Forms question (atleast, it should be simple)

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2002
    Location
    USA
    Posts
    10

    Simple Forms question (atleast, it should be simple)

    I create a new instance of FrmLogin

    Code:
            Dim LoginForm As FrmLogin
            LoginForm = New FrmLogin()
            LoginForm.Show()
    If I unload (close/set to nothing) the current form I'm on, then frmLogin is lost. Something I don't want to happen.

    How do you guys load a form, while closing the one you were on?

    Thanks!

  2. #2

    Thread Starter
    New Member
    Join Date
    Dec 2002
    Location
    USA
    Posts
    10

    Unhappy


  3. #3
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    The First form loaded carries the 'Application Thread' and can't be closed until the end of the application. You could hide it or you can show the other forms modally from sub main before calling the 'Main Form'.

  4. #4

    Thread Starter
    New Member
    Join Date
    Dec 2002
    Location
    USA
    Posts
    10
    Originally posted by Edneeis
    The First form loaded carries the 'Application Thread' and can't be closed until the end of the application. You could hide it or you can show the other forms modally from sub main before calling the 'Main Form'.
    ****... that's so sloppy.

    Basically, I'll have to hide it and close it later on. :-/

  5. #5
    Fanatic Member robbedaya's Avatar
    Join Date
    Jul 2002
    Location
    Belgium
    Posts
    872
    Originally posted by VBGOD
    Basically, I'll have to hide it and close it later on. :-/
    exactly, that is what you have to do. I don't like it either.
    - Use the thread tools to Mark your Thread as Resolved when your question is answered.
    - Please Rate my answers if they where helpful.

  6. #6
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    What are you calling as your 'Main' form, that needs to close after a little while? I would start from a Sub Main and then show any login or temporary forms modally before using Application.Run(New frmMain).

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