473,406 Members | 2,713 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

MessageBox breaks thread

But in a weird way...

BackgroundWorker creates another background worker that updates the UI
through a series of ReportProgress calls - works fine.

Thread A
---- creates and spins up Thread B
Waits for a signal from Thread B to proceed
Upon signal, a MessageBox is displayed to gather Yes/No.
DialogResult return sets semaphore for Thread B to terminate and calls
Join.

IF I do not specify an IWin32Window in the MessageBox call, all is well...
except that the MessageBox can occasionally get lost behind the application.
If I specify any window, including the main UI thread, I get:

"This operation has already had OperationCompleted called on it and further
calls are illegal." This all comes from a ReportProgress call. From what I
can gather, the thread still wants to loop as before.

Any thoughts?
Nov 29 '06 #1
0 1972

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Drew Lettington | last post by:
I'm making a simple call to display error messages in a MessageBox from a Windows form and the MessageBox is not behaving in a modal fashion. My modal form displays, the user clicks a button and...
0
by: James Fike | last post by:
Okay the wierdest thing has started happening to me. Everytime I use a MessageBox.Show in Debug Visual Studio breaks for a break point thats in the System.Windows.Forms.MessageBox.ShowCore...
4
by: Mystery Man | last post by:
We have developed a CSharp program that has a secondary thread that is used to perform background operations. This secondary thread may display some MessageBoxes or Forms. However, if the...
4
by: Tressa | last post by:
I have a messagebox that I only want to pop up only if it is not already being displayed on the screen. My code is still poping up the messagebox even though it is on the screen. What am I doing...
7
by: Pi | last post by:
I have an MDI parent with one or more children forms. Each child form has an engine thread that processes data. The child form's _Closing event is roughly 01 Private Sub...
2
by: Nuno Magalhaes | last post by:
Why does the MessageBox.Show function in the thread below changes the program behaviour, in other words, the APListView becomes filled with values with a call to RefreshAPListView. Without the...
1
by: =?Utf-8?B?RGF2ZSBCb29rZXI=?= | last post by:
How can I kill or close a MessageBox that is shown in a thread that I later abort? In the following code, the MessageBox will always stay open until closed by the user, even when the other event...
0
by: pni8ac | last post by:
Hi, I'm having a weird problem. I use a thread to generate a lot of data in c#, and at the end of the thread I sould have a messagebox that show. If I execute the code two time, everything work...
3
Fr33dan
by: Fr33dan | last post by:
Hi All, I'm working on adding a message box method that will allow me to display a message to the user without waiting for the user to answer. I've done this by starting MessageBox.Show in a...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.