IE7 - FullScreen toggle effect programmatically similar like F11

Discussion in 'Internet Explorer' started by Indian Ocean, Aug 28, 2008.

  1. Indian Ocean

    Indian Ocean Guest

    I am working on OLE automation where we need to fire F11 kind of call from
    our application hosted in IE7 to make IE fullscreen.
    I could get IWebBrowser2 and called put_FullScreen method. I am facing a
    problem here.
    Fullscreen works fine (similar like iexplore.exe -k) but if I have 2 tabs in
    the IE then Control+Tab is not working and it doesn't show tabs in UI like
    F11 does (sliding down the address bar and tabs). When I go back to original
    view, it dosn't show me the tabs as well Ctrl+Tab not working. If I press
    Ctrl+W then it closes current tab and the other tab shows but tabbed view not
    showing as I mentioned above.
    I am using the following code:


    CComQIPtr<IServiceProvider> sp = pActiveSite;
    (pActiveSite is IOleClientSite *)
    CComPtr<IWebBrowser2> m_pBrowser;
    HRESULT hr = sp->QueryService IID_IWebBrowserApp, IID_IWebBrowser2,
    (void**)&m_pBrowser);
    VARIANT_BOOL v = VARIANT_FALSE;
    VARIANT_BOOL v1 = VARIANT_TRUE;

    m_pBrowser->put_FullScreen(v1);
    m_pBrowser->put_FullScreen(v);

    Please guide me to achieve FullScreen toggle effect programmatically similar
    like F11 does in IE7.

    Thanks in advance,
     
    Indian Ocean, Aug 28, 2008
    #1
    1. Advertisements

  2. Indian Ocean

    Indian Ocean Guest

    I got it.
    Its TheaterMode
    See the code below,

    CComQIPtr<IServiceProvider> sp = pActiveSite;
    (pActiveSite is IOleClientSite *)
    CComPtr<IWebBrowser2> m_pBrowser;
    HRESULT hr = sp->QueryService IID_IWebBrowserApp, IID_IWebBrowser2,
    (void**)&m_pBrowser);
    VARIANT_BOOL v = VARIANT_FALSE;
    VARIANT_BOOL v1 = VARIANT_TRUE;

    m_pBrowser->put_TheaterMode(v1);
    m_pBrowser->put_TheaterMode(v);

    HTH, to those who looks for such solution,
     
    Indian Ocean, Sep 1, 2008
    #2
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.