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