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

.NET (Core and Framework)

 
GeneralRe: Accessing a network .mdb from Windows Service Pin
Stephane Rodriguez.13-Feb-03 7:50
Stephane Rodriguez.13-Feb-03 7:50 
GeneralRe: Accessing a network .mdb from Windows Service Pin
Jamie Nordmeyer13-Feb-03 7:57
Jamie Nordmeyer13-Feb-03 7:57 
GeneralRe: Accessing a network .mdb from Windows Service Pin
leppie14-Feb-03 6:17
leppie14-Feb-03 6:17 
GeneralRe: Accessing a network .mdb from Windows Service Pin
Jamie Nordmeyer14-Feb-03 9:36
Jamie Nordmeyer14-Feb-03 9:36 
GeneralRe: Accessing a network .mdb from Windows Service Pin
Richard Deeming14-Feb-03 0:00
mveRichard Deeming14-Feb-03 0:00 
GeneralRe: Accessing a network .mdb from Windows Service Pin
Jamie Nordmeyer14-Feb-03 9:20
Jamie Nordmeyer14-Feb-03 9:20 
GeneralIP performance counter in .NET Pin
princedom13-Feb-03 6:37
princedom13-Feb-03 6:37 
GeneralMultiple UI Threads, One .NET App Pin
jjreilly12-Feb-03 6:00
jjreilly12-Feb-03 6:00 
I submitted the following to the microsoft.public.dotnet.framework.windowsforms newsgroup:

I've seen a number of posts about threads, forms and controls. I
realize that you shouldn't operate directly on a control from a thread that isn't the control's creating UI thread.

What I want to know is this. In the old Win32 days, your application could create multiple what-they-call UI threads. Each thread had a message pump. You could create a window (say your frame window) on one thread, and create a child window on another thread. The messages for each window would be handled in the context of the window's creating thread.

Some posts have said you can't do that in .NET. Well, I did it.
And it sort of worked.

I created a normal C# Win Forms app. I created another thread. This new thread created a couple of controls. The key is that the
framework prevents you from using the controls's and form's Parent
property to properly hook up the window hierarchy. But you can get
the handles to the form and the controls, and you can call the Win32 SetParent API to hook them up. This works and I can handle events in the proper thread context.

I tried it using a PictureBox control and got a strange result. The strange result was that the picture box control "disappeared" if I set the BorderStyle to anything other than None. I mean, if I look for the picture box in Spy++, the window was real gone, man.

I'm hoping to have some uSoft wizard tell me a couple of things.
First, can I really not use the 1.0 framework to have multiple UI
threads, where one UI thread serves child windows of another UI
thread? Second, any idea why my experience with picture box half
worked?

Thanks. Isn't this interesting???

john.
GeneralRe: Multiple UI Threads, One .NET App Pin
Stephane Rodriguez.12-Feb-03 8:08
Stephane Rodriguez.12-Feb-03 8:08 
GeneralRe: Multiple UI Threads, One .NET App Pin
jjreilly13-Feb-03 6:14
jjreilly13-Feb-03 6:14 
GeneralChecking file changes Pin
Joao Vaz11-Feb-03 0:27
Joao Vaz11-Feb-03 0:27 
GeneralRe: Checking file changes Pin
Stephane Rodriguez.13-Feb-03 8:02
Stephane Rodriguez.13-Feb-03 8:02 
GeneralRe: Checking file changes Pin
Joao Vaz13-Feb-03 20:48
Joao Vaz13-Feb-03 20:48 
GeneralRe: Checking file changes Pin
Giles21-Feb-03 3:59
Giles21-Feb-03 3:59 
GeneralRe: Checking file changes Pin
Stephane Rodriguez.22-Feb-03 0:44
Stephane Rodriguez.22-Feb-03 0:44 
GeneralRe: Checking file changes Pin
Giles23-Feb-03 5:17
Giles23-Feb-03 5:17 
GeneralRe: Checking file changes Pin
Stephane Rodriguez.23-Feb-03 5:25
Stephane Rodriguez.23-Feb-03 5:25 
GeneralRe: Checking file changes Pin
Giles21-Feb-03 3:58
Giles21-Feb-03 3:58 
GeneralRe: Checking file changes Pin
Joao Vaz21-Feb-03 6:19
Joao Vaz21-Feb-03 6:19 
QuestionUser controls in toolbox? Pin
Jörgen Sigvardsson8-Feb-03 7:51
Jörgen Sigvardsson8-Feb-03 7:51 
AnswerRe: User controls in toolbox? Pin
leppie8-Feb-03 9:05
leppie8-Feb-03 9:05 
GeneralRe: User controls in toolbox? Pin
Jörgen Sigvardsson8-Feb-03 9:14
Jörgen Sigvardsson8-Feb-03 9:14 
GeneralRe: User controls in toolbox? Pin
leppie8-Feb-03 9:23
leppie8-Feb-03 9:23 
AnswerRe: User controls in toolbox? Pin
James T. Johnson8-Feb-03 12:33
James T. Johnson8-Feb-03 12:33 
GeneralRe: User controls in toolbox? Pin
Jörgen Sigvardsson8-Feb-03 13:00
Jörgen Sigvardsson8-Feb-03 13:00 

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.