Hey,
I'm writting a programm that uses socket programming. I've put all the networking code in one Class library and use all the function like connect and sendmessage and so on from other forms. There is one form I'm having problem with it. Basically, the application recieves compule of strings form the server, writes them to a file, and then calls one form called Solution. While this form is loading, it opens the file and read lines (3 lines) and put each in one textbox. Then there a button to click that is supposed to close this form but not the application (this.hide() or this.close())
Ive tried having functions in other forms and opening the form from a form other than the DLL. I tried opening it like:
Solution S = new Solution();
S.ShowDialog();
but the problem i'm facing is, when i click on the close button in the Solution form, I get an InvalidOperatio nException error. The error is:
............... ............... ............... .........
System.InvalidO perationExcepti on was unhandled
Message="The Undo operation encountered a context that is different from what was applied in the corresponding Set operation. The possible cause is that a context was Set on the thread and not reverted(undone )."
............... ............... ............... .........
can anyone help me with this?
Bytheway, Im using C#
I'm writting a programm that uses socket programming. I've put all the networking code in one Class library and use all the function like connect and sendmessage and so on from other forms. There is one form I'm having problem with it. Basically, the application recieves compule of strings form the server, writes them to a file, and then calls one form called Solution. While this form is loading, it opens the file and read lines (3 lines) and put each in one textbox. Then there a button to click that is supposed to close this form but not the application (this.hide() or this.close())
Ive tried having functions in other forms and opening the form from a form other than the DLL. I tried opening it like:
Solution S = new Solution();
S.ShowDialog();
but the problem i'm facing is, when i click on the close button in the Solution form, I get an InvalidOperatio nException error. The error is:
............... ............... ............... .........
System.InvalidO perationExcepti on was unhandled
Message="The Undo operation encountered a context that is different from what was applied in the corresponding Set operation. The possible cause is that a context was Set on the thread and not reverted(undone )."
............... ............... ............... .........
can anyone help me with this?
Bytheway, Im using C#
Comment