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 application

Windows.forms application

Scheduled Pinned Locked Moved C#
csharphelpquestion
8 Posts 5 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.
  • V Offline
    V Offline
    viana
    wrote on last edited by
    #1

    Hi, i'm starting C#, and i have a problem: I'm developing a application that should open one "window", which should be created from a form that has buttons, like a menu selector. When i click the button it should open a new especific form, e.g. button 1 opens form1; button 2 opens form 2 ... That i can do, but i want to open it in the same "window", not openning a new window with my new form, an when i hit a save button i want to go to the previous form. Can´t it be done??? thank for your time.

    S R A C 4 Replies Last reply
    0
    • V viana

      Hi, i'm starting C#, and i have a problem: I'm developing a application that should open one "window", which should be created from a form that has buttons, like a menu selector. When i click the button it should open a new especific form, e.g. button 1 opens form1; button 2 opens form 2 ... That i can do, but i want to open it in the same "window", not openning a new window with my new form, an when i hit a save button i want to go to the previous form. Can´t it be done??? thank for your time.

      S Offline
      S Offline
      Stephane Rodriguez
      wrote on last edited by
      #2

      It looks like a MDI app[^].

      1 Reply Last reply
      0
      • V viana

        Hi, i'm starting C#, and i have a problem: I'm developing a application that should open one "window", which should be created from a form that has buttons, like a menu selector. When i click the button it should open a new especific form, e.g. button 1 opens form1; button 2 opens form 2 ... That i can do, but i want to open it in the same "window", not openning a new window with my new form, an when i hit a save button i want to go to the previous form. Can´t it be done??? thank for your time.

        R Offline
        R Offline
        RB Emphasys
        wrote on last edited by
        #3

        It sounds like you want to create an MDI application. This gives you one main window while allowing you to open various child window applications. One of the authors on here wrote a cool little tutorial that should help you out. Check out this link: http://www.codeproject.com/csharp/mdiformstutorial.asp?target=mdi Ryan

        V 1 Reply Last reply
        0
        • R RB Emphasys

          It sounds like you want to create an MDI application. This gives you one main window while allowing you to open various child window applications. One of the authors on here wrote a cool little tutorial that should help you out. Check out this link: http://www.codeproject.com/csharp/mdiformstutorial.asp?target=mdi Ryan

          V Offline
          V Offline
          viana
          wrote on last edited by
          #4

          Thanks for your sujection. I tried it and hit worked. I have a small question, how can i remove de icon in my child form?. I want to open it maximized without de maximize, minimize and close button, and change the menubar. Thanks

          R 1 Reply Last reply
          0
          • V viana

            Thanks for your sujection. I tried it and hit worked. I have a small question, how can i remove de icon in my child form?. I want to open it maximized without de maximize, minimize and close button, and change the menubar. Thanks

            R Offline
            R Offline
            RB Emphasys
            wrote on last edited by
            #5

            Its funny you say that, because I posted a question similar to that just a little while ago, here are a couple of solutions for you: http://www.codeproject.com/script/comments/forums.asp?forumid=1649&select=491274&df=100&fr=51#xx490206xx S. Rod gives you a great solution, I give a simple one. Good luck, its titled form design quandries. Good luck, Ryan

            1 Reply Last reply
            0
            • V viana

              Hi, i'm starting C#, and i have a problem: I'm developing a application that should open one "window", which should be created from a form that has buttons, like a menu selector. When i click the button it should open a new especific form, e.g. button 1 opens form1; button 2 opens form 2 ... That i can do, but i want to open it in the same "window", not openning a new window with my new form, an when i hit a save button i want to go to the previous form. Can´t it be done??? thank for your time.

              A Offline
              A Offline
              Adam Turner
              wrote on last edited by
              #6

              Instead of using MDI, you could create all of your "forms" as user controls and just handle their loading/unloading on the same form

              V 1 Reply Last reply
              0
              • A Adam Turner

                Instead of using MDI, you could create all of your "forms" as user controls and just handle their loading/unloading on the same form

                V Offline
                V Offline
                viana
                wrote on last edited by
                #7

                " Instead of using MDI, you could create all of your "forms" as user controls and just handle their loading/unloading on the same form " Could you please send me a small example? thanks

                1 Reply Last reply
                0
                • V viana

                  Hi, i'm starting C#, and i have a problem: I'm developing a application that should open one "window", which should be created from a form that has buttons, like a menu selector. When i click the button it should open a new especific form, e.g. button 1 opens form1; button 2 opens form 2 ... That i can do, but i want to open it in the same "window", not openning a new window with my new form, an when i hit a save button i want to go to the previous form. Can´t it be done??? thank for your time.

                  C Offline
                  C Offline
                  ctescu
                  wrote on last edited by
                  #8

                  It's more easy to use a panel in form and you cant make him on run-time like this . In the dinamic construction the bad point is that the RAM is more use that for static declaration , but the diference is very small . in Click event of the window make the code { Panel p=new Panel(); //give Panel properties this.Controls.Add(p); }

                  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