Re: Multithread and UI again ! :)
- From: "Dmytro Lapshyn [MVP]" <x-code@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 26 Jul 2006 10:06:26 +0300
Hi,
Can it be that you construct the second form on a worker thread?
The Invoke method can also be tricky - make sure that the control on which you call Invoke was created on the main UI thread.
--
Regards,
Dmytro Lapshyn [MVP]
http://blogs.vbcity.com/DmytroL
"maxima" <maxima@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:8B3E9653-A02B-42A1-BA29-97CF3626BE30@xxxxxxxxxxxxxxxx
Hi,
I have done some coding with UI being accessed from different threads before.
But now I stuck. Need your help guys! :)
My application run not the form but some ApplicationContext class (in
function Main - Application.Run(new MyAppContext());)
That class creates 2 children. Model1 and Model2. Model1 being created in
MyAppContext constructor. In a turn frmMain being created in model1's
constructor as well..
So frmMain has no problem at all..
Model2 could be created in 2 different methods of MyAppClass. They being
called from Model1. In such a case (in Model2's constructor) frmSecond being
created and shown.
When it goes to method1 - frmSecond works fine. When it is from method2 -
frmSecond popping up to the screen but white and doesnt show anything.
All the methods which access UI in frmSecond - all are through Invoke thing.
So everything still works (I can see it in debuger). But doesnt show anything
on screen :(
Please help! :)
.
- Prev by Date: Re: Auto update smart client
- Next by Date: Setting MdiParent property on a form created by another non-Mdi form
- Previous by thread: RE: Focus visualization on XP
- Next by thread: Re: Multithread and UI again ! :)
- Index(es):
Relevant Pages
|