Icon not showing in the window's title bar

Author: fearandir@gmail.com (fearandir)

Hi all, I am trying to configure my uniface application to show different windows bar icons depending of the enviroment.   I start uniface.exe from a BAT file, this way : start "APP" "<windowspath>\Uniface.exe" /asn="<windowspath>\app.asn" /ini="<windowspath>\usys1.ini" <startupshellname> And my usys1.ini file have set the ICON setting under the [application section] [application] Icon=<windowspath>\Myicon.ico   But instead, Windows, shows the icon of the program that Windows uses when you open ICO files. I.E Photophop   Thanks in advance, Sergio


  1. Hi Sergio, Which version of Uniface and which version of Windows are you using? Gianni

    Author: gianni (gianni.sandigliano@unifacesolutions.com)
  2. Uniface  Windows 7 professional

    Author: fearandir (fearandir@gmail.com)
  3. Hi Sergio, From the documentation: Icon Specifies the application icon to be used when the application (or session panel) is minimized. This setting applies only to the Uniface runtime on Windows, not to the Uniface IDE. Personally I only have experience on changing the icon of a 'direct' shortcut. This is done in Windows, in the properties of the shortcut (Properties->Change Icon and then point to an .ico file). Regards, Arjen

    Author: Arjen van Vliet (arjen.van.vliet@uniface.com)
  4. This is working for us in 9.6, it changes the icon in the top left hand corner of the application. (and i think the one on the windows toolbar, but that might be the .exe we use to start the session. 

    Author: Iain Sharp (i.sharp@pcisystems.co.uk)
  5. I changed my usys.ini and added: [application] icon=D:\usys90\IMAGES\4balls.ico When running the APS, I got in the application shell the icon. Also the messagebox on application-close shows the icon. However this will not work when the application runs in SDI mode, since it will not have an application shell. For instance the IDE v10 is an SDI application and will therefore not respond on the setting. Only the messagebox on close can show the icon in this case. Now when we want to change the icon of the executable without changing the shortcut properties, we have to dive into the exe itself. Copy uniface.exe to for instance pipo.exe. Do a file load of pipo.exe into VisualStudio which will show the contents of the exe in a tree view. select the icon. Load the icon you want to use in VisualStudio and press CTRL+C. Go back to the UNIFACE icon and paste the new icon into the pipo.exe. Press Ctrl+S to save the executable. No you won't see a difference in the file explorer yet. Next, you have to delete the icon cache in Windows. 1.    Starting the Task Manager 2.    Ending the explorer.exe process (Right click on explorer.exe -> End process) 3.    Opening a command line window (File -> New Task (Run...) -> Type cmd.exe) 4.    In the cmd window type cd %userprofile%\appdata\local 5.    Now you need to delete the iconcache.db file "del iconcache.db /a" 6.    Exit the cmd window by typing "exit" 7.    Starting the explorer again (File -> New Task (Run...) -> Type explorer.exe) Now you should be able to see the new icon in the file explorer. When the pipo.exe is delivered to a customer it will show the new icon. Hope this helps Jasper

    Author: Jasper (jasper.de.keijzer@compuware.com)
  6. To delete the iconcache in Windows I did this: 1. Open a Windows Command Line session 2. In this session goto the directory with the iconcache files: For Windows 8 and Windows 10 C:\Users\<your username>\AppData\Local\Microsoft\Windows\Explorer For Windows Vista and Windows 7 C:\Users\<your username>\AppData\Local    3. Right-click on the Windows taskbar and choose Task Manager from the shortcut  menu 4. Right-click on Windows Explorer in the list and choose End Task from the shortcut menu. The Explorer and desktop will disappear. Exit Task Manager and make sure that no other application is running except for the Windows Command Line session. 5. Delete iconcache via the Windows Command Line session using the command    del  iconcache*.db 6. Check with the command dir if the iconcache*.db files are really gone. 7. Press Ctrl+Alt+Del and choose Sign off. Sign back in and now you should have the changed icon for your own Uniface executable. Peter

    Author: PBeugel (peter.beugel@uniface.com)