Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: IntControl 1007 Change Icon .ICO
IntControl(1007, 1, 1, '', '') for x=0 to 8 Click=IntControl(1007, 4, 2, '', 'c:\myicon.ico|%x%') Message(x,'Click') nextBut the icon never changes. Why?
An .ICO file only contains a single 'Icon Group' (with multiple icon images) . It is completely up to Windows to decide which icon image is displayed in the task bar.
Icons are stored in .DLL and .EXE files in 'Icon Groups'. Each 'Icon Group' can contain multiple icon images, each with a different size and/or color depth.
If you pass IntControl 1007 a resource (EXE or DLL) containing multiple 'Icon groups', you can specify a different icon using the following format:
"filename|#"where "filename" is the name of the file, followed by a vertical bar and then the offset of the desired icon in the file ("#"). The first icon in a file has an offset of 0.
For Example:
IntControl(1007, 1, 1, "", "") For x=0 to 10 Click=IntControl(1007, 4, 2, "", "C:\WINDOWS\system32\shell32.dll|":x) Timedelay(1) NextOr if you must use .ico files, then you will need to create a .ICo file for each image you would like displayed:
icons = FileItemPath ( 'C:\Program Files\WinBatch\Icons\*.ico' ) IntControl(1007, 1, 1, '', '') for x=1 to 10 ico = ItemExtract( x, icons, @tab ) IntControl(1007, 4, 2, '', ico) TimeDelay(1) next
Article ID: W18294
Filename: IntControl 1007 Change Icon .txt
File Created: 2008:04:14:09:31:04
Last Updated: 2008:04:14:09:31:04