"vooose" <no****@microsoft.com> wrote in message
news:ey**************@tk2msftngp13.phx.gbl...
Thanks for your replies. "this" is a Control - I should have clarified
that initially. What about if you replace Invoke with BeginInvoke? I
realise this executes it async but since MyMethod was marshalled before
MyMethod2 shouldnt it always finish first as well (ie MyMethod gets hold
of the underlying window thread first ALWAYS)
Regards
--
Wal
http://www.vooose.com
*** Sent via Developersdex http://www.developersdex.com ***
I'm pretty sure it will using BeginInvoke - however I always feel a bit
uncomfortable about relying on this type of behavior. If you really want the
two methods to execute in Method1, Method2 order, use BeginInvoke on a
method that executes Method1 and Method2 synchronously. It will certainly
make youo intention clearer to anyone looking at the code.
Regards
Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog http://www.dotnetconsult.co.uk