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. Visual Basic
  4. Windows Forms

Windows Forms

Scheduled Pinned Locked Moved Visual Basic
questionwinforms
5 Posts 4 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.
  • N Offline
    N Offline
    newtwales
    wrote on last edited by
    #1

    How do I open a Form from another Form? newtWales

    C D 2 Replies Last reply
    0
    • N newtwales

      How do I open a Form from another Form? newtWales

      C Offline
      C Offline
      CWIZO
      wrote on last edited by
      #2

      Create a new instance of the form you would like to open and call the Show ( or ShowDialog) method on the created object. Q:What does the derived class in C# tell to it's parent? A:All your base are belong to us!

      1 Reply Last reply
      0
      • N newtwales

        How do I open a Form from another Form? newtWales

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

        Dim newForm As New Form2
        newForm.Show()
        ' or
        Dim dr As DialogResult
        dr = newForm.ShowDialog()
        ' Do something with the DialogResult...

        RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

        H 1 Reply Last reply
        0
        • D Dave Kreskowiak

          Dim newForm As New Form2
          newForm.Show()
          ' or
          Dim dr As DialogResult
          dr = newForm.ShowDialog()
          ' Do something with the DialogResult...

          RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

          H Offline
          H Offline
          HaloZa
          wrote on last edited by
          #4

          Thats for version 1 and 1.1 but in 2 i have noticed that u can do it the old fationed way like in vb6 where u dont have to do the whole Dim newForm As New Form2. u can just newForm.Show().

          D 1 Reply Last reply
          0
          • H HaloZa

            Thats for version 1 and 1.1 but in 2 i have noticed that u can do it the old fationed way like in vb6 where u dont have to do the whole Dim newForm As New Form2. u can just newForm.Show().

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

            ACtually, the libraries in VB.NET2005 are doing that very thing for you. Just because you CAN do it in VB.NET, doesn't mean you SHOULD be doing it. Any VB6 project run through the Upgrade Wizard in VS.NET 2002, 2003, or 2005, will do the same thing. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

            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