Skip to main content



      Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » OLEAutomation - Disable Existing IE Toolbar
OLEAutomation - Disable Existing IE Toolbar [message #629549] Tue, 28 September 2010 12:28 Go to next message
Eclipse UserFriend
Hello,

I want to disable already opened internet explorer toolbar. I access IE Com API
IWebBrowser2::ToolBar Property through the OLEAutomation API.It never works please find the code.

String webBrowserId="{8856F961-340A-11D0-A96B-00C04FD705A2}";

// IWebBrowser
final OleAutomation webBrowser = new OleAutomation(webBrowserId);
int toolBarID[] = webBrowser.getIDsOfNames(new String[] {"ToolBar"});

Variant[] disabled = new Variant[1];
disabled[0] = new Variant(false);

webBrowser.invoke(toolBarID[0], disabled);
webBrowser.dispose();

Please find the COM API reference

http://msdn.microsoft.com/en-us/library/aa752127%28VS.85%29. aspx
http://msdn.microsoft.com/en-us/library/aa768274%28v=VS.85%2 9.aspx

Please let me know what is wrong.


Thanks

[Updated on: Tue, 28 September 2010 12:41] by Moderator

Re: OLEAutomation - Disable IE Toolbar [message #630067 is a reply to message #629549] Thu, 30 September 2010 10:37 Go to previous message
Eclipse UserFriend
Hi,

I don't understand your context. Are you embedding the IE WebBrowser
control (like what swt's Browser does), or are you trying to act on a
stand-alone IE instance?

If you're embedding an IE WebBrowser then you should not need to do this,
since the toolbar is part of the browser chrome which you (or a client of
yours) is in control of anyways. For an example of this, see swt's IE.java
class, which receives OnToolBar events to indicate whether a child window
opening with a new web browser should show a toolbar or not. It takes this
value and simply sends it to the swt client for handling when
OnVisible(true) is received for the child window, since the swt client is
responsible for the chrome area where the toolbar would appear.

If this does not address what you want to do then please follow up, thanks.

Grant


"msnkar" <senthil.n.kumar@marlabsglobal.com> wrote in message
news:i7t4uo$s8h$1@news.eclipse.org...
> Hello,
>
> I want to disable already opened internet explorer toolbar. I access IE
> Com API
> IWebBrowser2::ToolBar Property through the OLEAutomation API.It never
> works please find the code.
>
> String webBrowserId="{8856F961-340A-11D0-A96B-00C04FD705A2}";
>
> // IWebBrowser
> final OleAutomation webBrowser = new OleAutomation(webBrowserId);
> int toolBarID[] = webBrowser.getIDsOfNames(new String[] {"ToolBar"});
> Variant[] disabled = new Variant[1];
> disabled[0] = new Variant(false);
> webBrowser.invoke(toolBarID[0], disabled);
> webBrowser.dispose();
>
> Please find the COM API reference
>
> http://msdn.microsoft.com/en-us/library/aa752127%28VS.85%29. aspx
> http://msdn.microsoft.com/en-us/library/aa768274%28v=VS.85%2 9.aspx
>
> Please let me know what is wrong.
>
>
> Thanks
Previous Topic:how to create a shell non-activated?
Next Topic:Tree resizes not correctly after expanding/collapsing
Goto Forum:
  


Current Time: Sun Jul 06 13:24:56 EDT 2025

Powered by FUDForum. Page generated in 0.03929 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top