Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Application icon not behaving as expected.

Status
Not open for further replies.

roadbeer69

Programmer
Mar 24, 2007
14
US
Hi All,

I've used the Project->Options->Application dialog to set an application's icon. The icon shows up in the upper-left corner of the main window, but it does not show up in the app's task bar button, next to the program in explorer, on the alt-tab window selection pop-up, or on child forms launched from the main app. What shows up in those places is a default windows application icon.

I used icoFx to create the icon and have used icoFx's resource editer to insert the icon in other programs. When I did that, the icon showed up correctly in all expected locations.

I tried using icoFx's resource editor on my app to insert my icon, and over the course of several attempts (spread out over many weeks), had mixed, inconsistent, and variable results in terms of which icons were present and which were missing. Once, it even worked, and all the icons were there, but I haven't been able to get back to that point since rebuilding the app.

Any ideas? Is using Project->Options->Application to set the icon not enough? Do I need to set it somewhere else, as well?

I am using the Turbo edition of Borland C++.

Thanks in advance,
Jeff
 
I've not used Turbo C++ but in Builder, that's the way I set the icon with not problems. Maybe a problem with your resource file?




James P. Cottingham
-----------------------------------------
[sup]I'm number 1,229!
I'm number 1,229![/sup]
 
Thanks for the response, James.

Are you speaking of the projectName.res file?
 
Yes. I don't know if Turbo has a way of recreating a resource file or not. What happens if you move the file somewhere and restart your app in Turbo? Does that recreate it for you?



James P. Cottingham
-----------------------------------------
[sup]I'm number 1,229!
I'm number 1,229![/sup]
 
Yes, that causes the .res file to recreate - it didn't fix the problem though.

Even after closing Borland, deleting the .res file, and then reopening Borland and the project (I got a message saying it was recreating the .res) my icon was still in the upper corner of the main app. But when I looked at the icon setting in project icons, it was an icon that seems to magically appear there: looks like a bunch of skyscrapers. This is the one I often see appearing for my app on the task bar, even when the icon I want is on the main form.

After that, I set the icon in options to my icon, and nothing changed - still get my icon in the main form and the skycrapers on the task bar. This is the sort of thing I've had going on for a while.

Jeff
 
Like I said, I've not used Turbo so I can't say if this is a bug or a "feature" of the program. In Builder, that is also the default icon but once you go into Project->Options you can set up a new icon.



James P. Cottingham
-----------------------------------------
[sup]I'm number 1,229!
I'm number 1,229![/sup]
 
Same is happening in Borland C++ builder 2007. the icon is working and showing up the the toolbar, and in the taskbar. But not in the actual EXE. it stays having the default icon.
 
By setting my app's TApplication object's Icon property at run-time to my icon, I was able to get the icon to show up in the task bar and the alt-tab bar. As I said above, it was already showing up in the application window. However, it is still not showing up next to the app in explorer or on the desktop...

 
The fact that setting the Application->Icon property at run time doesn't make the icon show up next to the app in explorere makes sense, of course...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top