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. How to destroy a child WinForm after operation?

How to destroy a child WinForm after operation?

Scheduled Pinned Locked Moved C#
questiontutorial
2 Posts 2 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.
  • F Offline
    F Offline
    fantasy1215
    wrote on last edited by
    #1

    I have a MDI winform program, I create a child WinForm frmChild; In this frmChild, I have a button Add to do some operation, after the operation is done, I want to destroy the frmChild form. How can I do this?

    OnBtnAdd()
    {
    do_operation();
    //do the operation, and succeeded
    //then I want to destroy this child form.
    //here How to destroy the child form?
    }

    L 1 Reply Last reply
    0
    • F fantasy1215

      I have a MDI winform program, I create a child WinForm frmChild; In this frmChild, I have a button Add to do some operation, after the operation is done, I want to destroy the frmChild form. How can I do this?

      OnBtnAdd()
      {
      do_operation();
      //do the operation, and succeeded
      //then I want to destroy this child form.
      //here How to destroy the child form?
      }

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Did you try Close()?

      Why is common sense not common? Never argue with an idiot. They will drag you down to their level where they are an expert. Sometimes it takes a lot of work to be lazy Please stand in front of my pistol, smile and wait for the flash - JSOP 2012

      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