Results 1 to 3 of 3

Thread: [RESOLVED] Close intro form

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    May 2004
    Location
    South Charleston, WV, USA
    Posts
    607

    Resolved [RESOLVED] Close intro form

    My intro form is the startup for the project. The user clicks on a button on the intro form to get the main form. At that point I want the intro form to close. If I do

    Code:
    MDIMainParentForm.Show()
    Me.Close()
    both forms close.

    If I do

    Code:
    MDIMainParentForm.Show()
    Me.Hide()
    the project doesn't close when the main form is closed.

    I do

    Code:
    MDIMainParentForm.Show()
    and, of course, the intro form remains open.

    How can I close the intro form without closing the main form?

  2. #2
    VB For Fun Edgemeal's Avatar
    Join Date
    Sep 2006
    Location
    WindowFromPoint
    Posts
    4,255

    Re: Close intro form

    Quote Originally Posted by projecttoday View Post
    My intro form is the startup for the project. The user clicks on a button on the intro form to get the main form. At that point I want the intro form to close. If I do

    Code:
    MDIMainParentForm.Show()
    Me.Close()
    both forms close.
    You probably want to set Shutdown mode to "On last window close" in Project Properties > Application(tab) > Shutdown mode.

    By default its set to "When startup form closes".
    https://msdn.microsoft.com/en-us/lib...v=vs.140).aspx

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    May 2004
    Location
    South Charleston, WV, USA
    Posts
    607

    Re: Close intro form

    That does it. Thank you.

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