Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 06:12 Go to next message
Dennis Angelo is currently offline Dennis AngeloFriend
Messages: 1
Registered: July 2009
Junior Member
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 16:02 Go to previous messageGo to next message
Felipe Heidrich is currently offline Felipe HeidrichFriend
Messages: 29
Registered: July 2009
Junior Member
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 17:13 Go to previous messageGo to next message
Felipe Heidrich is currently offline Felipe HeidrichFriend
Messages: 29
Registered: July 2009
Junior Member
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 10:41 Go to previous messageGo to next message
Vijay RajFriend
Messages: 608
Registered: July 2009
Senior Member
Thats what OLE.OLEIVERB_INPLACEACTIVATE description says...

but its does not work on excel or word i think...


---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay
Re: How to hide Excel toolbars using SWT [message #650661 is a reply to message #513196] Tue, 25 January 2011 21:44 Go to previous messageGo to next message
Philipp M. Fischer is currently offline Philipp M. FischerFriend
Messages: 67
Registered: November 2010
Location: Germany
Member
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 18:05]

Report message to a moderator

Re: How to hide Excel toolbars using SWT [message #1472102 is a reply to message #513196] Thu, 13 November 2014 15:52 Go to previous message
Flavio Donze is currently offline Flavio DonzeFriend
Messages: 211
Registered: July 2009
Location: Switzerland
Senior Member
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());
		}
	}


Prozessmanagement und Qualitätsmanagement Software QMS/IMS
https://www.scodi.ch
Previous Topic:How to debug this?
Next Topic:drag image from windows explorer to canvas / table field
Goto Forum:
  


Current Time: Sat Apr 20 00:48:32 GMT 2024

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

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

Back to the top