473,385 Members | 1,359 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,385 software developers and data experts.

Threading - Merging a spawned thread with the main thread

I'm having a major problem with threads.

I have a main application that dynamically loads plugins. One of the
plugins receives SMS messages in a seperate thread. When an SMS comes in I
need to display an MDI Child form within the Main Application workspace. The
code bombs out when I attempt to assign the MDIParent of the child form to
the Main Form (in the main thread). Some how I need to merge the spawned
thread with the main thread before creating the child form.... any ideas?

I know Invoke() can be used for GUI controls, but I can't use this as I'm
creating the form from a class that is not a Form..!?!?

Thanks
Threading - Merging a spawned thread with the main thread
Jul 21 '05 #1
1 1409
Neds wrote:
I'm having a major problem with threads.

I have a main application that dynamically loads plugins. One of the
plugins receives SMS messages in a seperate thread. When an SMS comes in
I
need to display an MDI Child form within the Main Application workspace.
The code bombs out when I attempt to assign the MDIParent of the child
form to
the Main Form (in the main thread). Some how I need to merge the spawned
thread with the main thread before creating the child form.... any ideas?
..Join() ?

I know Invoke() can be used for GUI controls, but I can't use this as I'm
creating the form from a class that is not a Form..!?!?

Thanks
Threading - Merging a spawned thread with the main thread


--
Texeme
http://texeme.com

Jul 21 '05 #2

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

Similar topics

8
by: Ivan Nestlerode | last post by:
Hello comp.lang.python, I am attempting to write a threaded program right now in Python (version 2.3 on Debian unstable) and the current behavior of KeyboardInterrupt is causing me grief. From...
2
by: Christopher J. Bottaro | last post by:
Hello, I'm trying to write a fairly simple network program. The main thread spawns a thread which creates a listener socket and then calls socket.accept on it. socket.accept blocks indefinantly....
7
by: Tom B | last post by:
I've written the code below to try and figure out how threading works. My assumption is that when starting a new thread it would run at the same time as the original thread. Am I wrong? I've...
1
by: Ray Ackley | last post by:
I'm experiencing a threading problem that's really perplexing me. I have a multithreaded application that reads car ECU information that's sent over the serial port by the ECU and received by the...
13
by: RCS | last post by:
I have a UI that needs a couple of threads to do some significant processing on a couple of different forms - and while it's at it, update the UI (set textboxes, fill in listviews). I created a...
5
by: Robert W. | last post by:
I'm creating a WinForms app that will act as a companion (think administrator functionality) to a Pocket PC app. Generally the WinForms app works under just the UI thread. But if a Pocket PC...
1
by: Brad Brening | last post by:
I am building a class that has a function that I would like to run asycronously. When the function is complete I would like to notify the calling thread by raising an event or using a delegate. The...
1
by: Neds | last post by:
I'm having a major problem with threads. I have a main application that dynamically loads plugins. One of the plugins receives SMS messages in a seperate thread. When an SMS comes in I need to...
7
by: Tim | last post by:
Hi, I have developed a windows forms application that works fine on a single thread. Part of the requirements of this app is that it monitors the status of a couple of services. So I think...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.