Click here to Skip to main content
15,943,477 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: paint application question Pin
lfsong4-May-03 23:36
lfsong4-May-03 23:36 
GeneralRe: paint application question Pin
James T. Johnson5-May-03 1:01
James T. Johnson5-May-03 1:01 
QuestionAm I running as a native image? Pin
solidstore29-Apr-03 1:20
solidstore29-Apr-03 1:20 
AnswerRe: Am I running as a native image? Pin
Stephane Rodriguez.29-Apr-03 2:18
Stephane Rodriguez.29-Apr-03 2:18 
GeneralLow level network application Pin
Andrei Matei28-Apr-03 22:29
Andrei Matei28-Apr-03 22:29 
GeneralRe: Low level network application Pin
Andy Davey29-Apr-03 16:16
Andy Davey29-Apr-03 16:16 
Generalcall to the main thread Pin
OmegaSupreme28-Apr-03 15:59
OmegaSupreme28-Apr-03 15:59 
GeneralRe: call to the main thread Pin
Andy Davey28-Apr-03 16:24
Andy Davey28-Apr-03 16:24 
Are you trying to make sure that after something happens in your worker thread that a method is executed within the context of the main thread, or are you just trying to signal the main thread from your worker thread.

Probably the easiest way would be to pass a waithandle to your worker thread and get your main thread to wait on the handle (or check it regularly) for the handle to be signaled and then go from there. But if thats the case then you might as well recode the worker thread as an asynchronous method call.

The above may not be to your liking Smile | :) Looking at the Mono project, the way they have implemented System.Windows.Forms.Control.Invoke() is place the delegate passed ot Invoke() in a queue. This queue is then checked in the windows message loop (which executes in the same thread as the control was created in), and any delegates in the queue are then called.

So you could create a synchronized queue, get your worker thread to place a delegate in this queue, and then either get your main thread to periodically check this queue or signal a waithandle, and then get the main thread to execute the delegates in the queue.
GeneralRe: call to the main thread Pin
OmegaSupreme28-Apr-03 16:54
OmegaSupreme28-Apr-03 16:54 
GeneralRe: call to the main thread Pin
david.minor3-May-03 18:51
david.minor3-May-03 18:51 
GeneralRe: call to the main thread Pin
Andy Davey5-May-03 21:24
Andy Davey5-May-03 21:24 
QuestionWill my .Net C# programs work on other OSs...? Pin
eggie528-Apr-03 14:41
eggie528-Apr-03 14:41 
AnswerRe: Will my .Net C# programs work on other OSs...? Pin
J. Dunlap28-Apr-03 16:05
J. Dunlap28-Apr-03 16:05 
AnswerRe: Will my .Net C# programs work on other OSs...? Pin
OmegaSupreme28-Apr-03 16:11
OmegaSupreme28-Apr-03 16:11 
GeneralCustomize toolbox during setup Pin
Patrick Lassalle26-Apr-03 4:22
Patrick Lassalle26-Apr-03 4:22 
GeneralRe: Customize toolbox during setup Pin
Burt Harris4-May-03 17:42
Burt Harris4-May-03 17:42 
GeneralUpdating Visual Studio to .NET 1.1 Pin
Katalyst25-Apr-03 17:26
Katalyst25-Apr-03 17:26 
GeneralRe: Updating Visual Studio to .NET 1.1 Pin
Kevin McFarlane25-Apr-03 23:52
Kevin McFarlane25-Apr-03 23:52 
GeneralRe: Updating Visual Studio to .NET 1.1 Pin
gregs11-May-03 11:44
gregs11-May-03 11:44 
GeneralRe: Updating Visual Studio to .NET 1.1 Pin
apferreira26-Apr-03 1:36
apferreira26-Apr-03 1:36 
QuestionRemoting GUI Services? Pin
bpavi25-Apr-03 14:35
bpavi25-Apr-03 14:35 
GeneralInstall assembly in the GAC Pin
Patrick Lassalle25-Apr-03 11:32
Patrick Lassalle25-Apr-03 11:32 
GeneralRe: Install assembly in the GAC Pin
J. Dunlap25-Apr-03 18:43
J. Dunlap25-Apr-03 18:43 
GeneralRe: Install assembly in the GAC Pin
Patrick Lassalle26-Apr-03 4:19
Patrick Lassalle26-Apr-03 4:19 
GeneralAutoEventWireUp question Pin
kensai25-Apr-03 9:02
kensai25-Apr-03 9:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.