Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

[..] Icon in the Windows taskbar (for non-AutoIt windows)

$
0
0

Bonjour, Hello, My name is Glass Joe !
 
[FYI, I'm under Windows 7 Pro & Windows 8.1 Family Edition] I based my code on the WinSetIcon function brought to me by Mikell on the french AutoIt forum ( here is the [link] ). This is the example code I used (with the _WinAPI_LoadImage function in order to force the icon size) :

#include <WinAPI.au3> ShellExecute(StringRegExpReplace(@AutoItExe, '(.+)\\[^\\]+', "$1") & "\AutoIt.chm") Do   Sleep(10) Until WinExists("AutoIt Help") $handle = WinGetHandle("AutoIt Help") WinSetIcon($handle, @ScriptDir&"\Icone.ico")   Func WinSetIcon($hwnd, $file)     Local $icon = _WinAPI_LoadImage(0, $file, $IMAGE_ICON, 32, 32, BitOR($LR_LOADFROMFILE, $LR_CREATEDIBSECTION))     If Not $icon Then Return False    _SendMessage($handle, 0x0080, 1, $icon) ; $WM_SETICON = 0x0080    _WinAPI_DestroyIcon($icon) EndFunc

And this is the screenshot concerning my problem :
http://www.autoitscript.fr/forum/download/file.php?id=3612&mode=view

As you can see, the icon I created has several sizes : 48x48, 32x32 and 16x16. All my taskbar icons are 32x32, but when the code above is executed, the icon is pixellated. The one in the upperleft corner of the window is correct, but it's the one is the taskbar that matters to me. Could you help me please !?

Thanks in advance for your help, and see you soon !
 
PS: When using a single-sized icon 48/32/16, I've got the same result : pixellated.
PS2: The green arrow icon in Mikell's example is also pixellated on each computer I used.

Attachment: The icon used with this sample code

Attached Files


Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>