Hi,
I'm working on a cybercafe management system that uses a
homemade messaging exchange system to communicate between the server and the
client softwares. Each one of the projects spawns another thread to wait
until a new message has arrived and process it. Some of the messages require
showing an user interface, like Messagebox.Show(). My problem is, I don't
want such calls to be executed on this thread, but on the main one. What
kind of options do I have to tell the other, running thread to execute a
subprogram/event ASAP?
Tales 3 2567
Bubble an event up to your UI layer, your going to have to create a delegate
to execute on the other thread. (Maybe, you do if you mess with controls
from other threads, but odn't know).
Basically you build a bridge at the UI level to cross the communication over
to the other thread. It's fun!
"Tales Normando" <ta*****@ibest.com.br> wrote in message
news:OP**************@TK2MSFTNGP11.phx.gbl... Hi,
I'm working on a cybercafe management system that uses a homemade messaging exchange system to communicate between the server and
the client softwares. Each one of the projects spawns another thread to wait until a new message has arrived and process it. Some of the messages
require showing an user interface, like Messagebox.Show(). My problem is, I don't want such calls to be executed on this thread, but on the main one. What kind of options do I have to tell the other, running thread to execute a subprogram/event ASAP?
Tales
Do you mean using Control.Invoke, Control.BeginInvoke and Control.EndInvoke?
"CJ Taylor" <no****@blowgoats.com> escreveu na mensagem
news:vs************@corp.supernews.com... Bubble an event up to your UI layer, your going to have to create a
delegate to execute on the other thread. (Maybe, you do if you mess with controls from other threads, but odn't know).
Basically you build a bridge at the UI level to cross the communication
over to the other thread. It's fun!
"Tales Normando" <ta*****@ibest.com.br> wrote in message news:OP**************@TK2MSFTNGP11.phx.gbl... Hi,
I'm working on a cybercafe management system that uses a homemade messaging exchange system to communicate between the server and the client softwares. Each one of the projects spawns another thread to wait until a new message has arrived and process it. Some of the messages require showing an user interface, like Messagebox.Show(). My problem is, I
don't want such calls to be executed on this thread, but on the main one. What kind of options do I have to tell the other, running thread to execute a subprogram/event ASAP?
Tales
Exactly.
"Tales Normando" <ta*****@ibest.com.br> wrote in message
news:ef**************@tk2msftngp13.phx.gbl... Do you mean using Control.Invoke, Control.BeginInvoke and
Control.EndInvoke? "CJ Taylor" <no****@blowgoats.com> escreveu na mensagem news:vs************@corp.supernews.com... Bubble an event up to your UI layer, your going to have to create a delegate to execute on the other thread. (Maybe, you do if you mess with
controls from other threads, but odn't know).
Basically you build a bridge at the UI level to cross the communication over to the other thread. It's fun!
"Tales Normando" <ta*****@ibest.com.br> wrote in message news:OP**************@TK2MSFTNGP11.phx.gbl... Hi,
I'm working on a cybercafe management system that uses a homemade messaging exchange system to communicate between the server
and the client softwares. Each one of the projects spawns another thread to
wait until a new message has arrived and process it. Some of the messages require showing an user interface, like Messagebox.Show(). My problem is, I don't want such calls to be executed on this thread, but on the main one.
What kind of options do I have to tell the other, running thread to execute
a subprogram/event ASAP?
Tales
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Franco, Gustavo |
last post by:
Hi, I have a question, and please I need a answer.
How can I finalize a thread running with Application.Run (I need the message
loop!!!) without call Thread.Abort?.
I want to call...
|
by: SSonnenwald |
last post by:
I have created a piece of code that uses a ThreadPool class and the
QueueUserWorkItem method to add items to the the ThreadPool. What
would seem to be simple I just can not figure out how to tell...
|
by: Jeffrey Palermo, MCAD.Net |
last post by:
I have some classes that control file processing in c#. The files come
from a mainframe and may take some time for each to process. I use the
Threadpool to process multiple files at once. Each...
|
by: Bill Thorne |
last post by:
We have a COM object that has been wrappered for use in .NET and which can
make calls which can take a while to execute. These are mainframe
integration calls that might perform a lot of data...
|
by: roni |
last post by:
hi.
i have applcation in net.
in that application i have 3 threads.
1- main thread with message loop and form
2. thread with message loop and form
3. thread with message loop and form
...
|
by: iwdu15 |
last post by:
how can i tell if my system has gone idle? then how can i execute a command
accordingly? thnks
|
by: nishi57 |
last post by:
I hope I can get some help regarding this issue, which has been going
on for a while. I have a desktop user who is having problem running
"Stored Procedures". The DB2 Connect application works fine...
|
by: care02 |
last post by:
Hi!
I have the following problem: I have written a short Python server
that creates an indefinite simulation thread that I want to kill when
quitting (Ctrl-C) from Python. Googling around has...
|
by: =?Utf-8?B?QWxwaGFwYWdl?= |
last post by:
Hello,
I have a class MyWorker.
Each time I create a new instance of MyWorker, I queue it to the ThreadPool.
So, 1 MyWorker object is pooled and belongs to its thread (there can't have 2...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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,...
|
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,...
|
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...
|
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...
|
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...
|
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: 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...
| |