Register Help Remember Me? weblink The following will be much more informative in the debugger: using (DialogBox dialog = new DialogBox()) { dialog.Text = caption; var r = dialog.ShowDialog(); return r; } Edit I find this As it appears randomly at different parts of my application, but always the same scenario: Dispose in the FormClosed event. Does anybody have some clues how to get rid of this exception?

Take a look atValue Dispose() cannot be called while doing CreateHandle() Error when Using Thread for a possible solution.Would you pleasecreate asimple solution or provide us with the problematic one that facebook google twitter rss Free Web Developer Tools Advanced Search  Forum Programming Languages - More Visual Basic Programming How to solve exception: Value Close() cannot be called while doing CreateHandle() Sharepoint 2013: Rest API - does header need to include X-RequestDigest? navigate here When you call Dispose() method (according to the error message this is what happens) on an object, that object will try to dispose of all its children and do some cleanup.

The reason why it does not work is probably somewhere in the form that you are trying to dispose of. That is the place to look for error. Not the answer you're looking for?

And does anyone know how I can solve the above problem?

I get this error at Dispose() method. It's working great. If you choose to participate, the online survey will be presented to you when you leave the Msdn Web site.Would you like to participate? All contents are copyright of their authors.

Your Privacy - Legal Statements Copyright © 1998-2015 Developer Express Inc.All trademarks or registered trademarks are property of their respective owners Dev Shed Forums Navigation Forums Tools Newsletter Signup Articles Help QGIS Print composer scale problems Polyglot Anagrams Cops' Thread Possible repercussions from assault between coworkers outside the office Was it legal to rant against trick or treating via loudspeaker during halloween? Tuesday, June 05, 2012 3:40 AM Reply | Quote Microsoft is conducting an online survey to understand your opinion of the Msdn Web site. his comment is here share|improve this answer answered Sep 23 '10 at 8:16 Jürgen Steinblock 14.5k1068118 1 The supplied link is broken. –kerem Apr 29 '15 at 14:30 1 @kerem That's why I

Not the answer you're looking for? Did this solve your problem or the person who asked the question? A couple of questions: Why is the closing of one instance affecting another? Register Lost Password?

Perhaps there is some kind of 'ready state' event that you can use to control the timing of closing and loading forms? For example, the following code gives the error: private void frmCustomer_Load(object sender, EventArgs e) { if (!Valid()) this.Close; } The Solution: private void frmCustomer_Load(object sender, EventArgs e) { if (!Valid()) this.BeginInvoke(new GO OUT AND VOTE Why does top 50% need a -50% translate offset? asked 3 years ago viewed 1735 times active 3 years ago Upcoming Events 2016 Community Moderator Election ends Nov 22 Related 14Dispose, when is it called?3System.InvalidOperationException: Value Dispose() cannot be called

Limit computation technology in a futuristic society How to prove that authentication system works, and that the customer is using the wrong password? The OS are XP and Windows7. All times are GMT -5. Contact Us Privacy Policy Terms & Conditions About Us ©2016 C# Corner.

And did you actually end up solving YOUR problem? –Jake Smith Apr 7 at 15:57 @JakeSmith Look at the question return (GetWindowLong(Me.Handle, GWL_STYLE) And WS_CAPTION) = WS_CAPTION The exception more stack exchange communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed Yes No Log In Products Suites BEST VALUE Universal (includes all DevExpress .NET products in one integrated suite) DXperience (includes all DevExpress .NET Controls along with CodeRush) .NET Products INDIVIDUAL PLATFORMS lần hàm Code: private void _btn_search_Click(object sender, EventArgs e) { _panel1.Visible = true; _panel2.Visible = false; flagFinish = false; Thread threatExecuting; threatExecuting = new Thread(new ThreadStart(executing_search)); this._timer1.Stop(); this._timer1.Start(); threatExecuting.Start(); } thì

Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose.