No announcement yet.

Quality of ICO in PB dialogs

  • Filter
  • Time
  • Show
Clear All
new posts

  • Quality of ICO in PB dialogs

    Is there any way to increase the resolution or the appearance of the icon in the PB dialog. In my resource file the same icon when showed in the Windows task bar is much crisper and is not pixelated like it is in PB.... thanks...Dean

  • #2
    Not sure what you mean here. At first it sounds like you are talking about PB itself, but I'm guessing you mean your app. If your app, then you need to design more icons for your ico file. You most likely only have a 16x16 icon in there. Add a 32x32 at least for better looking icons. Then 48x48 and up for XP/Vista looks, etc.
    Mobile Solutions
    Sys Analyst and Development


    • #3
      Hi Roger,

      It is a 32x32 icon. I am not sure why it is not translating to that in the PB dialog. On the minimized task bar in Windows it looks great...but not with the Dialog Set Icon...

      I will see if i can make it 48x48 and see what Vista/PB delivers...



      • #4
        Try other direction. Make a good looking 16x16, and put it first in resource.

        32x32 and 48x48 are for the desktop. The automated shrinking to 16x16 for title bar is making it unattractive. The resizer for the task bar must work better. By making your own 16x16, you avoid the resizing.


        • #5
          You should have at least two sizes for the icon - 16x16 and 32x32 (additionally, 48x48 is mostly used in later versions of Windows for "thumbnail" view). I use LoadImage where you can specify the size icon that you want and Windows will load the closest match.

          Here is a snippet of code I use in one of my applications:

            Dialog Send ghMain, %WM_SETICON, %ICON_BIG, LoadImage(GetModuleHandle(ByVal %NULL), "#100", %IMAGE_ICON, 32, 32, 0)
            Dialog Send ghMain, %WM_SETICON, %ICON_SMALL, LoadImage(GetModuleHandle(ByVal %NULL), "#100", %IMAGE_ICON, 16, 16, 0)
          As you can see, both the "small" and "big" icons are covered to prevent any unwanted resizing. The 32x32 icon is also used with Alt+Tab task switching and possibly elsewhere.
 | Slam DBMS | PrpT Control | Other Downloads | Contact Me


          • #6


            Your command did the trick:

            Dialog Send ghMain, %WM_SETICON, %ICON_BIG, LoadImage(GetModuleHandle(ByVal %NULL), "#100", %IMAGE_ICON, 32, 32, 0)

            The PB Dialog Set Icon obviously allows Windows to resize the icon...

            Thanks again, Dean