I've got a little confusion regarding the application icons in my program.
In pure PowerBasic, I can just ensure that whatever icon I want as the main application icon is alphabetically first. So perhaps I could call it "AAAAA_App_Icon_Big.cio". This works nicely. However, in FireFly, adding an alphabetically-first ICO to the Image Library (F7) doesn't work.
So researching the PB forums, the following code additions seems to be effective.
In FF_AppStart:
#RESOURCE Icon APP_ICON_BIG, "..\images\App_Icon_Big.ico"
#RESOURCE Icon APP_ICON_SMALL, "..\images\App_Icon_Small.ico"
Then in FF_WinMain:
SendMessage hInstance, %WM_SETICON, %ICON_BIG, LoadIcon(GetModuleHandle(ByVal 0), "APP_ICON_BIG") ' API sets Alt-Tab window (Task-switch view)
SendMessage hInstance, %WM_SETICON, %ICON_SMALL, LoadIcon (GetModuleHandle(ByVal 0), "APP_ICON_BIG") ' API set Caption & Taskbar
Now this seems a little messy. Is this how it's done in FireFly, or is there a much simpler way that I'm missing?
You can explicitly set that in the Project Properties.
Thanks, I'll revisit that Project Properties option. It didn't work when I first tried it, which led me down this code path.
Perhaps my icon is formatted incorrectly. Does an icon for this have to be an exact size and format? I haven't found any documentation that specifically describes this.
Unfortunately no luck with the Project Properties area.
I found this in my travels: http://iconhandbook.co.uk/reference/chart/windows/
It's a nice reference for icon formats and sizes. I created an icon that matches that, and still didn't work within the Project Properties.
If you haven't already, try a 32x32 icon.
Well it appears to inadvertently have been my fault. In my project was some code I'd pulled from the PowerBasic forums. The code contained a number of #RESOURCE statements that included icons.
I've since removed all that, and now the Project Properties icon selection works. Not sure how things conflicted, but all is well now.
Thanks!