EnableOffice2007Frame Not Working |
Post Reply |
Author | |
GarethThom
Groupie Joined: 07 November 2006 Location: United Kingdom Status: Offline Points: 19 |
Post Options
Thanks(0)
Posted: 08 February 2011 at 7:55am |
The Environment: Xtreme SuitePro ActiveX 2009 Vol 4 (13.4.2)VB6 SP6 Reproducible on Vista & W7 (both 32 bit), in IDE and at Runtime The Problem: The title bar displays in black and removes the min, max and close buttons at the top right of the form as shown here in the Codejock Ribbon MDI Sample (slightly modified - see below): The Investigation: I have finally managed to track down the above display problem to calling the following line of code before any command bars / ribbon is added: CommandBars.EnableOffice2007Frame True This can easily be replicated if you take the standard Codejock Ribbon MDI Sample VB6 application and insert the above line before "LoadIcons" in MDIForm_Load() as follows: Private Sub MDIForm_Load() CommandBars.EnableOffice2007Frame True LoadIcons CreateRibbonBar ... ... End Sub It would appear that if you place the call to EnableOffice2007Frame after the ribbon is created you do not get the office theme applied. This is demonstrated using the standard Codejock SDI Sample whereby ticking and unticking the "Office 2007 Frame" check box appears to do absolutely nothing. I will be upgrading to v15 when (if?) it comes out tomorrow so if it is fixed in that release I personally will not be to bothered if it is fixed in v13.4.2 or not. As it stands, however, unless someone can suggest a workaround it looks as if I will have to disable the 2007 frame before the next release. Thanks in advance, Gareth
|
|
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
Just call RibbonBar.EnableFrameTheme after you create ribbon, statusbar, etc...
|
|
Xander75
Senior Member Joined: 26 April 2007 Status: Offline Points: 353 |
Post Options
Thanks(0)
|
As your investigation suggested and as per Supermario's suggestion you must always call: "CommandBars.EnableOffice2007Frame True" after you have created your RibbonBar.
It's not a bug that needs fixed, people just need to be aware that there is a method to creating the RibbonBar, which you now know. |
|
Product: Xtreme SuitePro (ActiveX) v15.3.1
Platform: Windows 7 64-bit (SP1) Professional Edition Languages: C#.Net using Visual Studio 2012 & Visual Basic 6.0 (SP6) |
|
GarethThom
Groupie Joined: 07 November 2006 Location: United Kingdom Status: Offline Points: 19 |
Post Options
Thanks(0)
|
Thanks for getting back to me, but I appear not to have described the problem properly.
If we take the standard SDI Sample then this is what it looks like on Windows Server 2008 with "Office 2007 Frame" unticked: and this is what it looks like ticked: Notice the Office 2007 style title bar as expected/desired. Running the exact same .exe on Vista produces this with "Office 2007 Frame" ticked: And looks identical with the "Office 2007 Frame" unticked, i.e. regardless of whether EnableOffice2007Frame is on or off, the title bar is not themed as per Office 2007 (shown above). This appears to be the same when applied to the ribbon (regardless of calling RibbonBar.EnableFrameTheme or not). Can someone please look at this again and clarify how to make this work? Thanks again, G.
|
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
Windows Vista & 7 Aero overrides the CommandBars theme. The only way I know to overcome this is to disable desktop composition (Aero) when your program starts, but unfortunately this is a system-wide setting, so it will likely bother your users more than if you leave the Aero theme alone.
If you still want to do this, here's some code (untested by me) that claims to accomplish this: http://www.vbforums.com/showpost.php?p=3296097&postcount=7 |
|
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
Yes, its designed behavior of EnableOffice2007Frame. Office products look same in Vista/Windows7.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
GarethThom
Groupie Joined: 07 November 2006 Location: United Kingdom Status: Offline Points: 19 |
Post Options
Thanks(0)
|
Fair enough, but I would make two observations:
G.
|
|
free_user
Groupie Joined: 08 March 2006 Status: Offline Points: 24 |
Post Options
Thanks(0)
|
Hi i am using Ribbonbar with design with commandbar designer. axCommandBars1.DesignerControls.DeleteAll(); how can i use "EnableFrameTheme" with code. Sorry for my bad english. |
|
Xtreme SuitePro (ActiveX) version 15.1.3
C# 2010 Xp Sp3 |
|
free_user
Groupie Joined: 08 March 2006 Status: Offline Points: 24 |
Post Options
Thanks(0)
|
hi
no answer for my question? Sorry for my pure English. |
|
Xtreme SuitePro (ActiveX) version 15.1.3
C# 2010 Xp Sp3 |
|
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
CommandBars.EnableOffice2007Frame True CommandBarsGlobalSettings.ResourceImages.LoadFromFile App.Path & "\..\..\..\Styles\Office2010.dll", "Office2010Blue.ini" CommandBars.VisualTheme = xtpThemeRibbon What do you mean you have no controls? You use the designer so you see no controls in CommandBars.DesignerControls? |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |