Delphi XE4 ios icons - ios

Suppose I want to supply my own app icons in deployment (imagine I switch these depending on customer) is there any file name/storage pattern I should follow? Can I set set app icons programmatically or otherwise compile/runtime?
Or do I have to use the Delphi IDE to specify all the icon resources?

What I have done now is o have a shared folder where my project is configured to get icons from. I then in Window Explorer simply change icons/backgrounds found in folder. However, this is far from an ideal solution, but I suppose I should mention it as a possible answer.

Related

Wrong exe icon in windows explorer when using resource file

I have an FMX application created in RAD studio 10.4 and have set the main icon in Project Options, Icons. I have also added 2 additional icons in the resource file using Resources and Images, which will be used by an installer to create file associations. All icons are 32x32 pixels. The main icon appears correctly in the application title bar but not in Windows explorer. It always takes the first of the 2 additional icons in the resource file. At first I thought this could be due to windows caching of icons but it is not. I'm using software called icofx to extract the icons from the exe and I see that the main icon always appears last.
I have tried changing the identifiers in Resources and images with the same result. The identifiers shown in icofx are not the ones I set. I've also tried renaming the additional icons so that they're last alphabetically, but that doesn't work either.
If I try the same with an old Delphi 7 project then it always results in the main application icon appearing first, which is what I want. Any ideas?
I have now resolved the issue by changing the identifiers of the additional icons so that they come after MAINICON alphabetically. The default is Icon_1, Icon_2, which come before MAINICON alphabetically. Changing them to ZIcon_1 and ZIcon_2 resolves the issue so that Windows Explorer takes MAINICON first.

delphi I'd like to make EXE which doesn't have an icon resource

I'm making many VCL form applications using delphiXE5 at present. The icon resource is unnecessary for it.
I'd like to make EXE which doesn't have an icon resource like a console application, but how should it be done?
Open your .dproj file in Notepad or similar editor and delete tags
<Icon_MainIcon>...</Icon_MainIcon>
With this approach your project will still have version information, as well as runtime themes (or custom manifests) enabled.
If you wish to add icon back, just go to Project Options -> Application and load yours or use default icon.

Best way to add icon to delphi 2007 app (win7)

I want to add icon to my delphi app. Icon was generated from image via ICOFX, including 128x128 and 256x256 (Vista) icons. I tried to add icon several times:
First of all, using Code Gear IDE: Project Options->Application->Icon. This was an easy way, but Vista-sized icons (128x128 and 256x256) were not added. When scaling in Windows Explorer Ctrl+Wheel, icon stoped increasing in size after 64x64. This happens because Delphi does not support big icons.
Then I tried to change icon in MyProject.RES file (using ResourseExplorer). It did not helped much.
When changing .exe-file icon using ResourseExplorer problems seems to be solved, but this is not a Path of a jedi, obviously. And some problems appears/remains, such as:
when changing .exe-file name (ex: from MEPROG.EXE to _MYPROG.EXE), file icon is changing either (128x128 and 256x256 icons disappeare).
when using MouseRightButton->Send to->Desktop to create a label, label's icon is of small resolution.
copy-pasting exe-file into some other directory(not in deplhi project output dir), could also change icon.
Is there a better way to do this, or I am doing this wrong way?
The Delphi 2007 IDE cannot handle large Vista icons, which use PNG compression. And neither can the brcc32 resource compiler that ships with Delphi 2007.
My solution, when I was still using legacy Delphi versions, was to make a .rc file containing the icons, and compile using the MS resource compiler, rc. The MS resource compiler does support such icons, and is readily available, for example with the Windows SDK.
See the change-log around 2.7 version
http://andy.jgknet.de/blog/ide-tools/ide-fix-pack/
it seems you just try to use Delphi without installing necessary fixes
PS. another way might be to make some command-line utility replacing icon resource and then auto-call it after compilation phase. Still ugly, but better than manually launchign ResEdit each time.
If you do not see the icon, you can just run the following command to clear the icon cache:
ie4uinit.exe -ClearIconCache
For Windows 10, use:
ie4uinit.exe -show

Apply Theme File in Delphi2009

Is it able to apply a ".theme" file to my app written in Delphi2009? I'm going to custom my app's look and feel, but by default, Delphi2009 has applied the UxTheme.dll and follow the Windows OS theme, what i need is to custom some components' color style, as a result, i've prepare a ".theme" file with the correct color value, but how can i apply it to the app so that it won't affect the default Windows style?
Thank you.
A .theme file contains customisation settings for an entire desktop. It is of no use for your goals. Windows does not perform per application theming. That requires custom drawing from the application, or third party add-ons like Window Blinds.
The easiest way to theme your app is to upgrade to the lates Delphi and use VCL styles, the feature introduced in XE2.

Delphi runtime theme enabled, but not used

In a legacy application (created in Delphi 6 under WinXP in 32-bit, recently ported to Delphi XE2 under Win7 in 64-bit) at design time, the standard controls look "modern", with color gradients etc. In run-time though, they look just like an old Win95 version.
That would not bother me much if, in particular, the default colors in TPageControl and TTabControl wouldn't make it really difficult to tell which tab is currently selected.
So my questions are:
What could make the theme not active at run time?
Is it possible to easily (e.g. through IDE configuration) make the design time look like the run time?
Note:
In the project options, I enabled runtime themes for each existing target. It didn't help.
I also tried to enable GlassFrame in the forms containing those controls. Unfortunately, the runtime look and feel stayed unthemed.
This application is built on a lot of in-house and external code that
I don't master (just a dwarf standing on shoulders of giants),
but whose source are available to me. Suspecting that some
instruction would disable themes at application startup, I looked for
some keywords like "Theme", "Skin", "TStyleManager", "SetWindowTheme"
hoping to solve this by myself. I could not find anything significant (to me, at least).
I tried to skin a small application as a test, using infos from
Question
Delphi XE2 VCL styles tutorial - how to change the style at runtime,
and it worked perfectly.
Skinning my application is not my goal. I just would like to be able to visually tune some GUI elements at design time, and it is easier if design and run time look alike.
It turns out that removing the line "{$R *.res}" in the dpr file had made the themes unavailable.
Under D6, I disabled version information in the project and replaced "{$R *.res}" with "{$R 'myApp.res' 'myApp.rc'}", to use my own rc file to have the version information in a separate, easy to edit file, and not to be forced to go through the project options.
Under XE2, that did not work anymore because the resource would often be overwritten (or not taken into account, I'm not quite sure) by Delphi during the build. I had to rename the rc file so that it does not match the application name, thus replacing "{$R 'myApp.res' 'myApp.rc'}" with "{$R 'myApp_rc.res' 'myApp_rc.rc'}".
Putting the "{$R *.res}" again (along with "{$R 'myApp.res' 'myApp.rc'}") seems to make things right with themes and not break the version information.
Thank you Brian for having me look in the good direction.
In my experience this is often due to project differences between DEBUG mode (used by default when in the IDE) and RELEASE mode. Open your project options and scroll to application (where themes styles and icon are defined). Notice that the platform and build option combo at the top holds separate values for each setting and I expect you will find that your DEBUG build config has runtime themes enabled but RELEASE does not.

Resources