WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Icons

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Embedded Systray Icon


Question:

I'm writing a script that waits in the system tray for the user to click the icon. I made the icon myself, so when I compile the program, I add the icon as a file to the executable. But when I move the compiled exe to antother place, and run it, a different (ugly!) icon appears in the systray.

The program must run on Win98 and 2K. At run, the app minimizes to the systray (IntControl 1007), using icon.ico. This icon-file resides in the same dir as the app. But I want just one .exe, so I want to "embed" icon.ico, as well as some extenders. I add the icon to the exe using "other file(s)" when I compile.

How do I make my program go to systray using the icon I embedded as a file in the exe?

Answer:

Read the documentation for IntControl 1007 about "p4".

Windows 98 and Windows 2000 use different size icons, so you need to use the "filename|#" format to force it to use a specific icon image (unless you create a multi-image icon). The icon can be an ICO file, or you can set it as the custom icon when you compile the EXE and then the icon will be contained in the EXE and you won't need a separate icon file.


Article ID:   W16010
File Created: 2004:03:30:15:42:12
Last Updated: 2004:03:30:15:42:12