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. frm.Close() issue

frm.Close() issue

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

    I am working on the C# code. I am presently using the 'this.Close()' when the user clicks on the 'Done' button on the form, but my application is crashing at this point. Is there someway by which I can close the form other than 'this.Close()' ? I tried using 'this.Dispose()', but it closes the application at some other point. Can you please help

    M 1 Reply Last reply
    0
    • A ArchaBhandare

      I am working on the C# code. I am presently using the 'this.Close()' when the user clicks on the 'Done' button on the form, but my application is crashing at this point. Is there someway by which I can close the form other than 'this.Close()' ? I tried using 'this.Dispose()', but it closes the application at some other point. Can you please help

      M Offline
      M Offline
      Martin 0
      wrote on last edited by
      #2

      Hello,

      ArchaBhandare wrote:

      but my application is crashing at this point

      What happens? (Which exception is thrown?) Are there some cyclic handlers (for example timers) programmed in your forms code? All the best, Martin

      A 1 Reply Last reply
      0
      • M Martin 0

        Hello,

        ArchaBhandare wrote:

        but my application is crashing at this point

        What happens? (Which exception is thrown?) Are there some cyclic handlers (for example timers) programmed in your forms code? All the best, Martin

        A Offline
        A Offline
        ArchaBhandare
        wrote on last edited by
        #3

        The Exception message is as follows "An unhandled exception of the type 'System.MissingMethodException' occurred in System.Windows.Forms.dll" I tried replacing the dll file, but it still crashes at 'this.Close()'. I have upgraded by device. Still the issue occurs. The best thing is that it works for all other forms, only for this particular form, the 'this.Close()' gives an exception. If I comment out this line of code and have a this.Dispose() instead, the application does to crash but closes automatically at some other point.

        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