CommandButton no image after compilation

The place for threads about TimoSoft ButtonControls.
Post Reply
User avatar
Mex
Captain
Posts: 130
Joined: 24 Sep 2009, 19:47

CommandButton no image after compilation

Post by Mex »

When i set hImageList then in debug mode button icon is shown correctly, but after compilation image is not visible.
User avatar
TiKu
Administrator
Administrator
Posts: 832
Joined: 28 Sep 2004, 21:10
Location: München
Contact:

Re: CommandButton no image after compilation

Post by TiKu »

Hi,

the hImageList property requires comctl32.dll 6.0, so make sure you provide a manifest file for your binary and that you're running the program on Windows XP or newer. Also have a look at the "Events" sample.
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
User avatar
Mex
Captain
Posts: 130
Joined: 24 Sep 2009, 19:47

Re: CommandButton no image after compilation

Post by Mex »

Still have problems with button image under Windows 7. Button image is not displayed.
Is't possible that, comctl32.dll on Windows 7 is lower as ver. 6 or there are somehow two different versions?


BR:
Meelis
Attachments
sshot2.png
(41.27 KiB) Not downloaded yet
User avatar
TiKu
Administrator
Administrator
Posts: 832
Joined: 28 Sep 2004, 21:10
Location: München
Contact:

Re: CommandButton no image after compilation

Post by TiKu »

The button is themed, so it definitly uses comctl32.dll 6. Does it work on Vista? Are the button images in the "Events" sample displayed?
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
User avatar
Mex
Captain
Posts: 130
Joined: 24 Sep 2009, 19:47

Re: CommandButton no image after compilation

Post by Mex »

In Events sample all is working fine, also is image displayer correctly with Vista.
Attachments
vista.jpg
(4 KiB) Not downloaded yet
User avatar
TiKu
Administrator
Administrator
Posts: 832
Joined: 28 Sep 2004, 21:10
Location: München
Contact:

Re: CommandButton no image after compilation

Post by TiKu »

Okay, so how do you attach the image list to the button? And how do you create and fill the image list?

If you save the button's properties to a file (it can be done via the property pages) and post this file here, I can also tell you whether the problem is caused by a specific setting.
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
User avatar
Mex
Captain
Posts: 130
Joined: 24 Sep 2009, 19:47

Re: CommandButton no image after compilation

Post by Mex »

I think this problem is related to VB's Common Controls. I installed on Windows 7 http://www.microsoft.com/downloads/deta ... laylang=en
and now it works fine.

Im setting hImageList property in Form_Load event - btnPrintTicket.hImageList = theImageList.hImageList

Meelis
User avatar
TiKu
Administrator
Administrator
Posts: 832
Joined: 28 Sep 2004, 21:10
Location: München
Contact:

Re: CommandButton no image after compilation

Post by TiKu »

Ah, so you use the ImageList control from the VB Common Controls? I always use API-generated image lists, because the VB control can't handle 32 bit icons.
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
User avatar
Mex
Captain
Posts: 130
Joined: 24 Sep 2009, 19:47

Re: CommandButton no image after compilation

Post by Mex »

Ok, now im smarter, in the future i use ImageList_Create API, even when i use 24 bit icons :)
Post Reply