Page 1 of 1

Just a icon & Text on Button

Posted: 15 Oct 2013, 10:13
by Andreas Vogt
Hi Timo,
How the hell can I add an Icon on a button?
I added the hImageList to the CommandButton and iconIndex = 1 but no icon is shown.
In your Samples the Bin-file works but the compiled project also shows no icon.

BTW: My comctl32.dll has version 5.82 (Windows Vista)
Andreas

Re: Just a icon & Text on Button

Posted: 15 Oct 2013, 18:57
by TiKu
The hImageList property requires version 6.x of comctl32.dll, so make sure that you specify a manifest file for the binary.
Windows Vista comes with versions 5.82 and 6.10 (and probably a couple of others). Which of them is used, depends on the presence of a manifest. Without manifest, version 5.82 will be used.

If you place a manifest file next to your VB6.exe file, you'll be able to use new features like this one even within the VB6 runtime environment. Note, that with Windows Vista you might need to restart the computer before the VB6.exe.manifest will be recognized.

Regards
TiKu

Re: Just a icon & Text on Button

Posted: 16 Oct 2013, 11:04
by Andreas Vogt
Thank you!

Re: Just a icon & Text on Button

Posted: 16 Oct 2013, 20:19
by TiKu
You're welcome.