473,503 Members | 1,805 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Pumping message problem

Hi there,

Does anyone have a "standard" solution for the following "standard" problem.
If thread 1 invokes "MessageBox()" and thread 2 then comes along and invokes
some method on thread 1 (via "Control.Invoke()") which in turn invokes
"MessageBox()" again (or performs any other GUI operation for that matter),
the second call to "MessageBox()" will immediately succeed of course and
hence disable the first message box. All this works of course since
"MessageBox()" pumps its own messages (allowing the delegate I pass to
"Control.lnvoke()" to run immediately). I'd like the delegate I pass to
"Control.lnvoke()" to block however until the first call completes. Is there
a standard way of doing this in C# (.NET) or do I have to synchronize things
myself. Thanks.
Sep 7 '06 #1
2 1439
"Control.lnvoke()" to block however until the first call completes. Is
there a standard way of doing this in C# (.NET) or do I have to
synchronize things myself. Thanks.
No standard way.
Synchronize yourself.

I wish somebody proves me wrong... :D
--
Happy Hacking,
Gaurav Vaish | http://www.mastergaurav.com
http://articles.edujinionline.com/webservices
-------------------
Sep 7 '06 #2
>"Control.lnvoke()" to block however until the first call completes. Is
>there a standard way of doing this in C# (.NET) or do I have to
synchronize things myself. Thanks.

No standard way.
Synchronize yourself.
I wish somebody proves me wrong... :D

Thanks for the feedback. It's unfortunate and I hope someone proves you
wrong also :)
Sep 7 '06 #3

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

Similar topics

1
2527
by: Jack Smith | last post by:
Hello, I need to show the following language is NOT context-free, using the pumping lemma for context-free languages. L = {wwdouble(w) | w is an element of {a,b}*}, where double(w) is derived...
3
11784
by: Nathan Alden | last post by:
I've already searched Google. I've already asked people in IRC. I have still not found a solution that works for me for this extremely discouraging apparent bug in the SmtpMail class. ...
8
9986
by: Rod | last post by:
I have been working with ASP.NET 1.1 for quite a while now. For some reason, opening some ASP.NET applications we wrote is producing the following error message: "The Web server reported...
6
1925
by: tshad | last post by:
I am trying to set up a Javascript popup box that has a way of sending back a message to asp.net on how to process some data. At the moment I am just doing: ...
7
6661
by: Ralf Gedrat | last post by:
Hello! I have some Vb.Net applications, which are terminated at indefinite times without message. If I call in the program regulated system.GC.Collect, then the program is terminated here...
12
1911
by: jburkle | last post by:
Hello all, I am still having an issue where multiple Message Boxes are being displayed to the user from the same form at one time. This issue hides the boxes behind the forms since the forms take...
10
3681
by: Rider | last post by:
Hi, simple(?) question about asp.net configuration.. I've installed ASP.NET 2.0 QuickStart Sample successfully. But, When I'm first start application the follow message shown. ========= Server...
2
15567
by: Bill Nguyen | last post by:
below is the error message I received when about 2/3 of the process is done. Where in my code I sould look for? Thanks Bill --------- The CLR has been unable to transition from COM context...
3
3819
by: Steven Allport | last post by:
I am working on processing eml email message using the email module (python 2.5), on files exported from an Outlook PST file, to extract the composite parts of the email. In most instances this...
0
7199
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
7074
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
7322
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...
1
6982
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7451
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...
1
5000
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4667
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
1
731
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
374
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.