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

Create new form from alternate thread

Hi, I am trying to write a program that can spawn forms when running in
an alternate thread outside the main one. It however doesnt like to do
anything related to the first thread when in the second one. How can i
create a secondary form from an alternate thread? Thanks.

Nov 21 '05 #1
2 1192
"xmutantduck" <xm*********@gmail.com> schrieb:
Hi, I am trying to write a program that can spawn forms when running in
an alternate thread outside the main one. It however doesnt like to do
anything related to the first thread when in the second one. How can i
create a secondary form from an alternate thread?

I am courious why you would want to create the forms on separate threads.
Instead of running forms in separate threads I suggest to put the operations
the forms are performing into separate threads and keep all of the forms
running in the application's main thread.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #2
If you want the alternate thread initiating the display of other forms
then you need to use Control.Invoke to marshal a method onto the main
UI thread where you can safely display other forms.

Brian

xmutantduck wrote:
Hi, I am trying to write a program that can spawn forms when running in
an alternate thread outside the main one. It however doesnt like to do
anything related to the first thread when in the second one. How can i
create a secondary form from an alternate thread? Thanks.


Nov 21 '05 #3

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

Similar topics

5
by: me | last post by:
I have a Class Library that contains a Form and several helper classes. A thread gets created that performs processing of data behind the scenes and the Form never gets displayed (it is for debug...
2
by: SMBR via AccessMonster.com | last post by:
I am not completely new to Access, but I have run into a road block in trying to normalize my database. I am not sure if I am using the correct structure here. I have tried to post a few times...
8
by: vince | last post by:
I have a windows app whose main dialog contains a button that launches a form. I've tried using Form.Show() to have it launch as a modeless form, but it behaves as if it's modal (i.e. parent form...
6
by: SamIAm | last post by:
Hi am creating a email application that needs to mail out a very large amount of emails. I have created a multithreaded c# application that using message queuing. I have created a threadpool of 5...
4
by: Daylor | last post by:
hi. i have multi thread application in vb.net is there a way NET support, so i can mark the class , to be access only for 1 thread each time ? if there is , small sytax sample will help ...
4
by: Thief_ | last post by:
I'm trying to create many squares on a form and for every new square, change the background colour to the next colour. I'm trying to create a colour palette showing all available colours and their...
5
by: dpomt | last post by:
When the ASP.NET menu is rendered on downlevel browers, the text "^ up one level" is displayed. Any ideas how I can change that text? I did not find a property for the menu control where I can...
7
by: Roemer | last post by:
Hi all I stumbled over a new problem: I have a programm with just a class that is asynchronous listening for network connections. As soon as someone connected, a new form needs to be created....
1
by: Dino Viehland | last post by:
I'm assuming this is by-design, but it doesn't appear to be documented: >>> '%8.f' % (-1) ' -1' >>> '%#8.f' % (-1) ' -1.' The docs list the alternate forms, but there isn't one...
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
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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,...

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.