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. Form closing or disposing

Form closing or disposing

Scheduled Pinned Locked Moved C#
helpcsharpdata-structuresquestion
3 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.
  • E Offline
    E Offline
    EEmaan
    wrote on last edited by
    #1

    I want to dispose my previous form on the after select event of tree view control but when i try to do so i get the following exception message System.ObjectDisposedException: Cannot access a disposed object named "TreeView". Object name: "TreeView". This problem has definate solution but It is bit complicated and I m not able to understand it plz any one can help me out in simple words or even some one only tell me that how can i close one form another form ....I tried it to close it even by making its object on that form n then call its close function ...But it too doesnt work ...i m building Windows application In C# 2003.Thanx for Ur help :)

    J 1 Reply Last reply
    0
    • E EEmaan

      I want to dispose my previous form on the after select event of tree view control but when i try to do so i get the following exception message System.ObjectDisposedException: Cannot access a disposed object named "TreeView". Object name: "TreeView". This problem has definate solution but It is bit complicated and I m not able to understand it plz any one can help me out in simple words or even some one only tell me that how can i close one form another form ....I tried it to close it even by making its object on that form n then call its close function ...But it too doesnt work ...i m building Windows application In C# 2003.Thanx for Ur help :)

      J Offline
      J Offline
      Jaiprakash M Bankolli
      wrote on last edited by
      #2

      Implement IDisposable Interface in all the pages and use the dispose method !!!

      Regards, Jaiprakash M Bankolli jaiprakash.bankolli@gmail.com http://jaiprakash.blog.com/

      E 1 Reply Last reply
      0
      • J Jaiprakash M Bankolli

        Implement IDisposable Interface in all the pages and use the dispose method !!!

        Regards, Jaiprakash M Bankolli jaiprakash.bankolli@gmail.com http://jaiprakash.blog.com/

        E Offline
        E Offline
        EEmaan
        wrote on last edited by
        #3

        Can u plz provide me some examplary piece of code Thanx:)

        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