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. forms and resource

forms and resource

Scheduled Pinned Locked Moved C#
learningcsharpwinformshelp
3 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.
  • A Offline
    A Offline
    arbrsoft
    wrote on last edited by
    #1

    In WinForms programming I made 3 Forms. and the 3 forms have same menu but the menu load all forms each of menu item. So I think I want to make it does not take more resource when hide a form and show another form. So I made write down like this... class Form1 public Form2 form2; Form3 from3; Form1() { form2=new Form2(); form3=new Form3(); } and like above in another form. it makes a recursive function and resource take more and more, it can't show main screen. constructor has all resource, it is not I want. then I copy some code that is using owner but It has some more and more resource when I open file and close file. I can't use form1.Close it will shut down my program. then I can't get resource when I hide a form. menu can bring any another form of my program and then hide or close using form. I must implement it. but I'm a beginner. So I want kind explain. thanks you for reading. Image will remind us some feelings and if I can ask someone about a problem, that's not a bad life.

    S K 2 Replies Last reply
    0
    • A arbrsoft

      In WinForms programming I made 3 Forms. and the 3 forms have same menu but the menu load all forms each of menu item. So I think I want to make it does not take more resource when hide a form and show another form. So I made write down like this... class Form1 public Form2 form2; Form3 from3; Form1() { form2=new Form2(); form3=new Form3(); } and like above in another form. it makes a recursive function and resource take more and more, it can't show main screen. constructor has all resource, it is not I want. then I copy some code that is using owner but It has some more and more resource when I open file and close file. I can't use form1.Close it will shut down my program. then I can't get resource when I hide a form. menu can bring any another form of my program and then hide or close using form. I must implement it. but I'm a beginner. So I want kind explain. thanks you for reading. Image will remind us some feelings and if I can ask someone about a problem, that's not a bad life.

      S Offline
      S Offline
      sreejith ss nair
      wrote on last edited by
      #2

      hi, The problem is the way you are programming. i am totally confused :confused: Tell me your real requirement. i can help you out.;) ************************** S r e e j i t h N a i r **************************

      1 Reply Last reply
      0
      • A arbrsoft

        In WinForms programming I made 3 Forms. and the 3 forms have same menu but the menu load all forms each of menu item. So I think I want to make it does not take more resource when hide a form and show another form. So I made write down like this... class Form1 public Form2 form2; Form3 from3; Form1() { form2=new Form2(); form3=new Form3(); } and like above in another form. it makes a recursive function and resource take more and more, it can't show main screen. constructor has all resource, it is not I want. then I copy some code that is using owner but It has some more and more resource when I open file and close file. I can't use form1.Close it will shut down my program. then I can't get resource when I hide a form. menu can bring any another form of my program and then hide or close using form. I must implement it. but I'm a beginner. So I want kind explain. thanks you for reading. Image will remind us some feelings and if I can ask someone about a problem, that's not a bad life.

        K Offline
        K Offline
        kodandapani
        wrote on last edited by
        #3

        Hi Can you try solving your problem using MDI form. Create a MDI form and make your forms as child's of it. You can make a form as MDI form by setting its IsMdiContainer property to true. You can make your forms form1, form2, form3 as child forms by setting their MdiParent property to object of your MDI form. Guess this solve your problem If you need more help let me know. Thanks.

        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