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. Calling forms

Calling forms

Scheduled Pinned Locked Moved C#
4 Posts 3 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.
  • G Offline
    G Offline
    Gregory Bryant
    wrote on last edited by
    #1

    ok i only know very little a made a form1 and a form2 what i do is hide form1 and open form2 now what i need to know is how then can i close form2 and reopen form1 anyone please

    A C 2 Replies Last reply
    0
    • G Gregory Bryant

      ok i only know very little a made a form1 and a form2 what i do is hide form1 and open form2 now what i need to know is how then can i close form2 and reopen form1 anyone please

      A Offline
      A Offline
      Ajay k_Singh
      wrote on last edited by
      #2

      Not very clear about the way both forms are being used in your application. However, please know that if a Form has been hidden only using Hide() method, it may be shown again by calling Form.Show() method. Any Form can be closed by calling its Close() method. If a form has been closed you may creating a new object of the form and call its show method. -Dave.

      Dave Traister, ComponentOne LLC. www.componentone.com

      G 1 Reply Last reply
      0
      • G Gregory Bryant

        ok i only know very little a made a form1 and a form2 what i do is hide form1 and open form2 now what i need to know is how then can i close form2 and reopen form1 anyone please

        C Offline
        C Offline
        Christian Graus
        wrote on last edited by
        #3

        The big tragedy of winforms and designers is that so many people create forms before they learn a little coding, then they get stuck down the line. I would advocate learning console stuff first. Having said that, if you want to hide form1 while form2 is visible, your best bet is to turn them both into controls and switch which one is visible on a single form.

        Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

        1 Reply Last reply
        0
        • A Ajay k_Singh

          Not very clear about the way both forms are being used in your application. However, please know that if a Form has been hidden only using Hide() method, it may be shown again by calling Form.Show() method. Any Form can be closed by calling its Close() method. If a form has been closed you may creating a new object of the form and call its show method. -Dave.

          Dave Traister, ComponentOne LLC. www.componentone.com

          G Offline
          G Offline
          Gregory Bryant
          wrote on last edited by
          #4

          i do know console programming in c++ you can go to www.planetsourcecode.com and serch Gregory W Bryant under C++ to see my programs but i dont know really any c# and i created the first form as a login the second displays a buddy list now on the second one i have a log out button that i want to close the second form and open the original first form not a new object i have everything done but reopening the first form

          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