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. Windows Forms
  4. win form

win form

Scheduled Pinned Locked Moved Windows Forms
tutorial
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.
  • M Offline
    M Offline
    mylogics
    wrote on last edited by
    #1

    i have made one of my form as mdi form. now i am trying to display other form in this form. i want that when new form is loaded the old one hides or get closed.plz guide how to do this. m new to win application.thanks

    D 1 Reply Last reply
    0
    • M mylogics

      i have made one of my form as mdi form. now i am trying to display other form in this form. i want that when new form is loaded the old one hides or get closed.plz guide how to do this. m new to win application.thanks

      D Offline
      D Offline
      dan sh
      wrote on last edited by
      #2

      How are you opening the second form? Can you post some code?

      M 1 Reply Last reply
      0
      • D dan sh

        How are you opening the second form? Can you post some code?

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

        on menu click i am opening the purchase form and vedor form.i want that when i open vendor/purchase form the previously opened form get closed..

        private void addNewVendorToolStripMenuItem_Click(object sender, EventArgs e)
        {

                Vendor frm = new Vendor();
                frm.MdiParent = this;
                frm.Show();
              
            }
        
            private void purchaseToolStripMenuItem1\_Click(object sender, EventArgs e)
            {
                Purchase frm = new Purchase();
                frm.MdiParent = this;
                frm.Show();
        
            }
        
        R 1 Reply Last reply
        0
        • M mylogics

          on menu click i am opening the purchase form and vedor form.i want that when i open vendor/purchase form the previously opened form get closed..

          private void addNewVendorToolStripMenuItem_Click(object sender, EventArgs e)
          {

                  Vendor frm = new Vendor();
                  frm.MdiParent = this;
                  frm.Show();
                
              }
          
              private void purchaseToolStripMenuItem1\_Click(object sender, EventArgs e)
              {
                  Purchase frm = new Purchase();
                  frm.MdiParent = this;
                  frm.Show();
          
              }
          
          R Offline
          R Offline
          RichardM1
          wrote on last edited by
          #4

          Before "frm.Show();", add "this.Hide();" Unless you are looking for a modal window that blocks the old window,then I think you change "frm.Show();" to "frm.ShowModal();"

          Opacity, the new Transparency.

          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