Re: webbrowser in thread ?



"Sam Shi" <shixy@xxxxxxxxx> wrote in message
news:erfRNTVmIHA.5368@xxxxxxxxxxxxxxxxxxxx
Can I create a webbrowser in a thread?

You probably mean, in a worker thread other than the main thread. Yes
you can, as long as this thread enters STA (see CoInitialize) and pumps
window messages (see GetMessage, DispatchMessage).
--
With best wishes,
Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925


.



Relevant Pages

  • Re: difference between STA and MTA
    ... > Any thread that calls CoInitialize() is said to enter the Single ... > Threaded Apartment. ... If someone calls an object that is created on a thread in an STA ... it in c# :-) i uses CoInitializeso my app will be STA right? ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Cross-apartment COM interface marhsalling
    ... It's interesting to know which calls pumps the ... If you create the object in an STA, ... The other thread will incur marshaling overhead (cross-thread ... message queue, that is don't call blocking API's like Thread.Sleep. ...
    (microsoft.public.dotnet.framework.interop)
  • Re: webbrowser in thread ?
    ... in a worker thread other than the main thread. ... as long as this thread enters STA (see CoInitialize) and pumps window ...
    (microsoft.public.inetsdk.programming.webbrowser_ctl)
  • Re: COM Apartments - Message Loops
    ... STA do you have to call CoInitialize() again for that spawned thread to ... STA apartment _requires_ a message pump, ... EXPLICITLY if you expect cross apartment interaction to occur. ...
    (microsoft.public.vc.atl)
  • Re: Windows messages for communication
    ... > got the impression that windows are strictly for GUI. ... Window messages are of course not ... That's true only in STA, ...
    (microsoft.public.vc.mfc)