Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Windows Forms Transition

Windows Forms Transition

Scheduled Pinned Locked Moved C#
winforms
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mrlou88
    wrote on last edited by
    #1

    I'm sure this is easy but I can't seem to find the answer. I want to close a form and open another without using Form1.Hide() and Form2.Show(). I want the first form to totaly close and the next form to be opened not as a child. Thanks

    D 1 Reply Last reply
    0
    • M mrlou88

      I'm sure this is easy but I can't seem to find the answer. I want to close a form and open another without using Form1.Hide() and Form2.Show(). I want the first form to totaly close and the next form to be opened not as a child. Thanks

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      You can't close the form that your app starts on. If you do, you're entire app will quit. What you do in your Form1 Load event is create a Form2, like a splash screen, show it, complete all your initialization, and at the end of the Form1 Load event, destroy Form2. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

      M 1 Reply Last reply
      0
      • D Dave Kreskowiak

        You can't close the form that your app starts on. If you do, you're entire app will quit. What you do in your Form1 Load event is create a Form2, like a splash screen, show it, complete all your initialization, and at the end of the Form1 Load event, destroy Form2. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

        M Offline
        M Offline
        mrlou88
        wrote on last edited by
        #3

        Yea, I ended up making them both separate threads and that worked

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups