Icon not showing in the window's title bar | Uniface 9 | Forum

Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

—  Results per page  —








— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters
For a group of consecutive words like 'end of support' use Match phrase

sp_Feed Topic RSS sp_TopicIcon
Icon not showing in the window's title bar
17 Nov 2016
6:55 pm
Avatar
fearandir
Member
Forum Posts: 29
Member Since:
07 Nov 2014
sp_UserOfflineSmall Offline

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

18 Nov 2016
12:00 pm
Avatar
gianni
Member
Forum Posts: 237
Member Since:
01 Oct 2012
sp_UserOfflineSmall Offline

Hi Sergio,

Which version of Uniface and which version of Windows are you using?

Gianni

18 Nov 2016
12:33 pm
Avatar
fearandir
Member
Forum Posts: 29
Member Since:
07 Nov 2014
sp_UserOfflineSmall Offline

Uniface 9.6.04.02 

Windows 7 professional

21 Nov 2016
11:19 am
Avatar
Arjen van Vliet
Member
Forum Posts: 156
Member Since:
01 Oct 2012
sp_UserOfflineSmall Offline

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

21 Nov 2016
11:24 am
Avatar
Iain Sharp
Member
Forum Posts: 596
Member Since:
01 Oct 2012
sp_UserOfflineSmall Offline

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. 

16 May 2017
2:46 pm
Avatar
Jasper
Member
Forum Posts: 30
Member Since:
01 Oct 2012
sp_UserOfflineSmall Offline

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

16 May 2017
4:41 pm
Avatar
PBeugel
Member
Forum Posts: 22
Member Since:
01 Oct 2012
sp_UserOfflineSmall Offline

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

Kind regards Peter Beugel Sr. Technical Support Analyst Uniface B.V.
Forum Timezone: Europe/Amsterdam

Most Users Ever Online: 131

Currently Online:
19 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

ulrich-merkel: 1677

Iain Sharp: 596

Theo Neeskens: 333

gianni: 237

rogerw: 228

lalitpct: 195

istiller: 191

-GHAN-: 171

Knut: 168

sochaz: 165

Member Stats:

Guest Posters: 3

Members: 4736

Moderators: 0

Admins: 8

Forum Stats:

Groups: 1

Forums: 62

Topics: 1980

Posts: 8555

Newest Members:

LadyEmode, SeoClism, Anatoliilak, eeomidmi, ujuewokiqov, avisecepuz, uwitoxus, ekiaeso, abiluwigueba, RonnieArror

Administrators: admin: 23, Adrian Gosbell: 268, diseli: 786, Bob Maier: 2, Nico Peereboom: 58, Michael Rabone: 4, richiet: 406, JanCees: 25