Re: IWebBrowser2 focus problem

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



"Sue" <jean.shu@xxxxxxxxx> wrote in message
news:1186712421.090817.36290@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
I create a modeless dialog and its child is a IWebBrowser2 window. I'm
developing a application to chat. The problem now is that if a user is
typing in one window and another window pop up since another person
ttry to chat with this person, the new window steal the focus.

WebBrowser would steal focus when a new page is loaded, as long as it's
UI-active. To make it inactive, query for IOleInPlaceObject and call
UIDeactivate. You may want to do it whenever your dialog becomes
inactive (e.g. in response to WM_ACTIVATE message).
--
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: Character names
    ... "verbose" mode off unless you want your chat window spammed with info about ... Sagart - Undead Priest (lvl 55) ... Beag - Dwarf Paladin ...
    (alt.games.warcraft)
  • Re: Beware Getting Reported
    ... thought to isolate that channel in its own window. ... Multiple windows for chat is a great way to separate the wheat from ... Separating it on another channel might make it usable. ...
    (alt.games.warcraft)
  • Re: communicator time out
    ... You may want to use the link below to post this to the MS Office Communicator newsgroup and describe your setup in a bit more ... When in a chat and nobody enters text for 10 minutes, ... If you enter text and send to the chat, it opens up another chat window so ...
    (microsoft.public.office.misc)
  • Re: ASP Update 1/23/12
    ... When the new window opens, it may ask you for permission to run a Java ... You'll have to allow for the Chat session to begin. ... At the bottom of the Main Menu there is a Chat Room menu item. ...
    (alt.smokers.pipes)
  • Re: activating windows from a separate thread
    ... programs where you have your main contacts window and multiple chat windows. ... > is called from the child form, it's visible flag is set to false. ... > I've tried calling invoke directly without testing...I get an exception ...
    (microsoft.public.dotnet.framework.windowsforms)