473,503 Members | 12,425 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Calling main thread from a worker thread

I know haw to call a the main thread from a worker thread in a windows form
class, but
how does a worker thread call its main thread from a none windows form
class?

Thank You.

ch***@predictiveconcepts.com
Nov 21 '05 #1
1 1393

It'd be better if the worker object broadcasted events that the main
form listens to. That way you don't have the tight binding of "i call
you and you call me" relationship.

The event broadcasting mechanism in .net takes care of joining the
proper thread (at least that's what I've been told, I haven't actually
found any documentation confirming this).

HTH,

Sam

On Thu, 13 Jan 2005 14:42:24 GMT, "Chad Miller"
<ch**@predictiveconcepts.com> wrote:
I know haw to call a the main thread from a worker thread in a windows form
class, but
how does a worker thread call its main thread from a none windows form
class?

Thank You.

ch***@predictiveconcepts.com


Nov 21 '05 #2

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

Similar topics

0
1583
by: Ted Miller | last post by:
Hi folks, I originally posted this on microsoft.public.dotnet.framework.interop. Reposting to broaden the audience. I'm having an interop problem where my managed component is reentered from...
15
11727
by: Bryan | last post by:
I have a multi-threaded C# console application that uses WMI (System.Management namespace) to make RPC calls to several servers (600+ ) and returns ScheduledJobs. The section of my code that...
5
9878
by: Hao L | last post by:
For example, void WorkerMethod() { ... UnregisterAllHotkeys();} void UnregisterAllHotKeys { for(...) {UnregisterHotKey(...);}} UnregisterHotKey is an API function that must be on the thread...
1
1596
by: Peter | last post by:
I found this awesome example of calling a Main Thread from a worker thread on abstractvb.com but I read through the example and would like to see if anyone can clarify some of this code below: ...
0
245
by: Chad Miller | last post by:
I know how to call a the main thread from a worker thread in a windows form class, but how does a worker thread call its main thread from a none windows form class? Thank You.
2
4127
by: Tim | last post by:
The are 2 threads - main thread and worker thread. The main thread creates the worker thread and then the worker thread runs in an infinite while loop till it is asked to exit by setting an event....
6
5978
by: Joe Jax | last post by:
I have an object that spawns a worker thread to process one of its methods. That method processes methods on a collection of other objects. During this processing, a user may request to cancel the...
1
6166
by: bytebugs | last post by:
Hi, As a matter of principle I have refranied from creating an instance of Form or UserControl from within a class that does not inherit from System.Windows.Form. I am looking for comments on...
3
4683
by: Klaus | last post by:
Hi, I have an existing VC 6 MFC application which communicates asynchronly with a VC 2005 managed code dll. I use an unmanaged base class with virtual functions to access methods in the MFC...
0
7212
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
7296
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
7364
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
7017
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
7470
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
5604
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,...
0
4696
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...
0
3186
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3174
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.