I just upgraded from Delphi 2009 to Delphi XE8. Doing so has changed the appearance of the buttons on the toolbar of my program.
When compiled with Delphi 2009, it looked like this:
But now with Delphi XE8, it looks like this:
It seems to me that this is related to the Down property. If a Down property of a button is true, then its background will be blue. If I click on the button then that will change the Down property to false and the button will lose the blue background.
Does anyone know what might be causing the blue background and how I can eliminate it?
I am on Windows 8.1.
Followup: David's answer that this is the default display for Windows 8.1 is correct. Checking other programs, I see they do this as well.
I wasn't expecting this to be the default because my program compiled with Delphi 2009 didn't do this. But as David also explained, that's because Delphi 2009 did not have built in theme support, but Delphi XE8 does. (It may have been added in Delphi XE2, but don't quote me on that)
David's mentioned the manifest as a possible cause. It wasn't in this case, but he alerted me that I may have multiple manifests and should check for it.
So the final answer to my question is that I don't want to eliminate the blue background. It is the Windows 8.1 default way of displaying Down buttons, and I want to display the native theme by my program.
Your D2009 program is not themed, but your XE8 program is themed. By that I mean that the XE8 includes an application manifest that specifies version 6 of comctl32. Your D2009 program does not include a manifest, or does not include that part of the manifest which requests comctl32 version 6.
The visual appearance of the XE8 program is the native platform appearance, and on the face of it, it would be normal to follow the platform's lead. So the option that I would opt for is to leave the appearance as the platform standard. That is go with the XE8 version.
However, to answer your question, you can revert to the old appearance by removing the comctl32 v6 part of the manifest. This will affect other parts of your program too. If you only want to disable themes for the toolbar, that can be achieved with SetWindowTheme.
Related
I have been looking for a proper tool or settings for Delphi XE2 IDE to support dark theme and haven't got around desired results. Dark Mode is available for 10.2 Tokyo and further versions is there any setting or freeware tool which is secure I can use please let me know.
Thanks,
Yash
What your are looking for is Delphi IDE Colorizer that allows changing colors of almost every part of Delphi IDE. In fact as far as I know it is much more powerful than Dark Mode that has been made available in Delphi 10.2.
Is it possible to change XE5's workspace to Delphi 7 like? Designing Forms inside a window is really pain and i would like to move components palette to up and design form outside of a canvas.
You can switch to the Classic Undocked desktop in the desktop drop down. It's not identical to Delphi 7, but it is possibly as close as you'll get out of the box.
The other thing you can try is to enable the floating designer, disabled by default. More details here: http://francois-piette.blogspot.co.uk/2013/04/enabling-floating-form-designer-in.html
You'll need to adapt the registry key to your version. The article has the key for XE4. For XE5 it is:
HKEY_CURRENT_USER\Software\Embarcadero\BDS\12.0\Form Design
Set the Embedded Designer value to False. Restart your IDE and you've now got a familiar floating design surface.
Ok, so I downloaded a .zip file of all different kinds of examples from embarcadero... the way the buttons look and among other things are completely different from when I just create an application within my Delphi 7. I believe these examples were made for or made at a new time... because the button look way different from the way the button when I put them on my application. the buttons from the example look very modern and sleek and have mouse over effects (This applies for all the examples..its not a custom component ) I was wondering I can get this effect in my own applications within Delphi 7.. I can do this by opening one of the examples and just erasing all the code... but that's not what im trying to do..im wondering how I can accomplish these styles.. how come the examples have these nice looking buttons and such..but when I make an app within D7 its much older looking and such..
I apologize if my question is hard to understand.. and I appreciate any help on this.
Thank you in advance.. I appreciate it.
If I understand your question correctly, you're asking about the native control appearance changes that were added by the addition of Windows Themes in Windows XP.
Delphi 7 supported themes by use of the XPManifest component, which does nothing but add a manifest to your application which tells Windows your app is theme-aware and therefore it should load a more recent version of the common controls library. You can find the XPManifest component in the VCL component palette on the Win32 tab, or simply add the XPMan.pas unit to your uses clause. Note that the themed drawing does not work for all controls (grids, for instance, are not drawn using themes, and IIRC neither is TSpeedButton - it's been a long time since I used D7, so I'm not sure exactly what is and isn't supported, but the support is limited).
Starting with Delphi 2007, there is built-in support for Windows Themes, which is available by default in new projects. It can also be enabled in older projects using a checkbox in the Project->Options->Application dialog.
(Of course the real answer is that if you want your app to have the features included in modern versions of Windows, you should upgrade from your Windows-95 era version of Delphi to one that is more recent.)
I recently experienced some unusual behavior in using a 3rd party Navigator component in Delphi 2007 whereby upon setting the 'Flat' property to True, the buttons didn't remain Flat as they should with Themes Enabled but did so once I unchecked Enable Themes from within my project file and recompiled my program. This obviously didn't seem right since another 3rd party Navigator component I experimented with performed accordingly with 'Flat' set to True and Themes Enabled. I then tried the same with Delphi's TDBNavigator and once again I experienced the same problem as I did with the first 3rd party Navigator component. In researching this matter online, I have found very little other than the fact that, unlike previous versions of Delphi, Delphi 2007 supports Themed Applications out of the box as opposed to having to add another component to support WinXP Themes. All considered, I am hoping that someone else may have experienced similar problems in using TDBNavigator or other 3rd party Navigator components in Themed Applications with the flat property set to true. Any comments or suggestions regarding this matter are appreciated.
Theme support was added to Delphi 2007, but doesn't apply to 100% of the VCL (grids, for example, don't have theme support). I'd suspect that's the issue you're having with the TDBNavigator.
As far as your "3rd party Navigator" problems, it's impossible to give you any advice because you didn't indicate which "3rd party Navigator" controls you're using. Without knowing the specific component names, you've given no information to us to use in trying to help.
Delphi 2010 provides full theme support, including grids. I haven't tested the DBNavigator, as I haven't used it since Delphi 2 or so. Note, however, that Delphi 2009/2010 introduces other issues with older code, because as of Delphi 2009 the VCL is Unicode-based. Some code that uses strings and assumes that a Char is 1 byte in size can be an issue.
Workaround on TDBNavigator,TSpeedButton bug
http://blog.issamsoft.com/index.php?q=en/node/37
When I minimize and restore my Delphi application, the window contents flash a horrible black before (re)painting on Vista/Win7. This can also be seen with the Delphi 2007 IDE - the Object Inspector, Project Manager, Messages window (but not the editor contents) also flash black when restoring.
None of the ususal flicker-free painting techniques seem to make any difference, and some even make it worse: DoubleBuffered, WS_EX_COMPOSITED, WM_ERASEBKGND, etc.
Most Microsoft applications do not exhibit this behavior. Is this a problem with Delphi's implementation of Windows forms? Does anyone know of a workaround?
When you register your window class, set hbrBackground to (HBRUSH)(COLOR_3DFACE + 1)
I would check that you have current video drivers and review all the settings. I have never seen the effect you describe on these OS, either with Delphi or my own apps; and if it was a widespread problem I feel sure that the Embarcadero newsgroups would be full of it.
I have D2007 and D2010 on two machines (Win7 64-bit laptop and Vista 32-bit desktop), and don't have this problem on either of them in either the IDEs or my applications.
Do you have theme support/Aero enabled? What video card and drivers? Are you using the classic appearance in Windows?