Skip to main content



      Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » How to hide Excel toolbars using SWT(Hiding the excel toolbar using SWT)
How to hide Excel toolbars using SWT [message #512826] Mon, 08 February 2010 01:12 Go to next message
Eclipse UserFriend
HI,
I have emdedded an OLE Excel.Sheet application on my SWT app but it always displays the toolbar. How do I hide the excel tollbar from the activex control and only display the grid/sheet?
Re: How to hide Excel toolbars using SWT [message #513037 is a reply to message #512826] Mon, 08 February 2010 11:02 Go to previous messageGo to next message
Eclipse UserFriend
Are you using OleClientSite or OleControlSite ?
Try calling DoVerb(OLE.OLEIVERB_INPLACEACTIVATE)

Check the msdn http://msdn.microsoft.com/en-us/library/ms694508(VS.85).aspx

Not sure if this will work, it depends on the ole object how they respond to the message.

You can also check the OLE API ref for Excel, maybe it has some method you can call (using olel automation) to hide to toolbar ?

Felipe
Re: How to hide Excel toolbars using SWT [message #513064 is a reply to message #512826] Mon, 08 February 2010 12:13 Go to previous messageGo to next message
Eclipse UserFriend
Are you using OleClientSite or OleControlSite ?
Try calling DoVerb(OLE.OLEIVERB_INPLACEACTIVATE)

Check the msdn http://msdn.microsoft.com/en-us/library/ms694508(VS.85).aspx

Not sure if this will work, it depends on the ole object how they respond to the message.

You can also check the OLE API ref for Excel, maybe it has some method you can call (using olel automation) to hide to toolbar ?

Felipe
Re: How to hide Excel toolbars using SWT [message #513196 is a reply to message #513037] Tue, 09 February 2010 05:41 Go to previous messageGo to next message
Eclipse UserFriend
Thats what OLE.OLEIVERB_INPLACEACTIVATE description says...

but its does not work on excel or word i think...
Re: How to hide Excel toolbars using SWT [message #650661 is a reply to message #513196] Tue, 25 January 2011 16:44 Go to previous messageGo to next message
Eclipse UserFriend
Hi there,

I faced the same problem, opening Excel 2003 as INPLACEACTIVATE but it overides all the menu entries of my RCP.

To overcome this i disabled the menus that are contributed by Excel.
Quote:

Look to the following Topic:

http://www.eclipse.org/forums/index.php?t=msg&th=203522


Cheers

Phil

[Updated on: Wed, 26 January 2011 13:05] by Moderator

Re: How to hide Excel toolbars using SWT [message #1472102 is a reply to message #513196] Thu, 13 November 2014 10:52 Go to previous message
Eclipse UserFriend
I was having the same problem with MS word. Here how I solved it:

	/**
	 * hides toolbars and ribbons of the passed client site
	 *
	 * @param site
	 */
	public static void hideToolbars(OleClientSite site) {
		int result = site.queryStatus(OLE.OLECMDID_HIDETOOLBARS);
		if ((result & OLE.OLECMDF_SUPPORTED) == OLE.OLECMDF_SUPPORTED) {
			site.exec(OLE.OLECMDID_HIDETOOLBARS, OLE.OLECMDEXECOPT_DODEFAULT, new Variant(), new Variant());
		}
	}
Previous Topic:How to debug this?
Next Topic:drag image from windows explorer to canvas / table field
Goto Forum:
  


Current Time: Wed Jul 23 18:03:21 EDT 2025

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

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

Back to the top