Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Suite Pro
  New Posts New Posts RSS Feed - Report Control: Icons in compiled program
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Report Control: Icons in compiled program

 Post Reply Post Reply
Author
Message
nighthawk View Drop Down
Senior Member
Senior Member
Avatar

Joined: 11 June 2004
Status: Offline
Points: 167
Post Options Post Options   Thanks (0) Thanks(0)   Quote nighthawk Quote  Post ReplyReply Direct Link To This Post Topic: Report Control: Icons in compiled program
    Posted: 13 June 2005 at 5:47am
I'm using an standard ImageList object to store 16x16 icons.  I use the following line to connect the ImageList to the report control:

ReportControl.SetImageList ilst16x16

When I run the program in the VB6 IDE, the icons in the report control display correctly.  When I compile the program and run the built EXE, the icons in the report control are displayed with a thick black border around the image portion of the icon. 

Does anyone know what might be going on here? 
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 13 June 2005 at 7:26am
I would suggest trying to use the ImageManager (ReportControl.Icons),.
Back to Top
nighthawk View Drop Down
Senior Member
Senior Member
Avatar

Joined: 11 June 2004
Status: Offline
Points: 167
Post Options Post Options   Thanks (0) Thanks(0)   Quote nighthawk Quote  Post ReplyReply Direct Link To This Post Posted: 13 June 2005 at 8:42pm
I just spent all day trying to get the ReportControl to use icons from an ImageManager.  The results are very inconsistant.  I use an ImageManager control to display icons in my CommandBar objects and it works fine.  When I connect the same ImageManager control to a ReportControl, the icons either don't show up at all, or will only show up after I start clicking around in the window.  Also, in the compiled version of the program, the ReportControls are completely unresponsive to mouse clicks.

I looked through the sample programs but it doesn't appear that any of them use a ReportControl with an ImageManager.  They all use the standard ImageList so I can't easily tell whether I am doing something wrong.

Looking back at my original implimentation, my icons use more than 256 colors so it may be that the ReportControl renders them correctly in the IDE but in the compiled program, the color depth is being reduced to 256 causing the edge of the image to go from a gray shadow to a black shadow.

Is this a possiblity and is there anything I can do about it?
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 13 June 2005 at 10:33pm
Look at the Outlook 2003 Sample (VB6) or the ReportSample (C# 9.70).  And the ReportControl can handle images with much more color that 256, you can even add 32-bit Alpha icons.
Back to Top
nighthawk View Drop Down
Senior Member
Senior Member
Avatar

Joined: 11 June 2004
Status: Offline
Points: 167
Post Options Post Options   Thanks (0) Thanks(0)   Quote nighthawk Quote  Post ReplyReply Direct Link To This Post Posted: 13 June 2005 at 11:42pm
I played around with the ImageManager a little more and got it to work with the ReportControl.  Apparently, the ReportColumn.Icon and ReportRecordItem.Icon requires the index of the icon in the ImageManager based on the order the icon was added.  Based on the documentation, I was using it like the CommandBarControl.IconID property which is based on the ID value assigned to the icon when it is added to the ImageManager.  I guess in some situations, the two could be the same but it isn't in mine.

Also, using the ImageManager does not fix my problem.  Here are partial screenshots of the ReportControl that illustrate what I am getting:


The icons in the left screenshot are how it looks in the IDE.  The right is how it looks when the program is compiled.  It appears the same whether I use the ImageManager or the ImageList.
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 14 June 2005 at 5:14am

May be the problem in bitmap? Can you upload it to check?

 

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
nighthawk View Drop Down
Senior Member
Senior Member
Avatar

Joined: 11 June 2004
Status: Offline
Points: 167
Post Options Post Options   Thanks (0) Thanks(0)   Quote nighthawk Quote  Post ReplyReply Direct Link To This Post Posted: 14 June 2005 at 5:30am
I'm using .ico files.  The same files are used for the CommandBar as well as the ReportControl.  The CommandBars display the icons correctly.  Here are some of the icons:

2005-06-14_052836_sample_icons.zip
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 15 June 2005 at 8:52am
I just used your icons in the ReportControl and they looked ok.  I think problem might be that you have 2 icons in each ICO file.  Both a 256 color and WinXP image.  Maybe you need to remove the 256 color image.
Back to Top
nighthawk View Drop Down
Senior Member
Senior Member
Avatar

Joined: 11 June 2004
Status: Offline
Points: 167
Post Options Post Options   Thanks (0) Thanks(0)   Quote nighthawk Quote  Post ReplyReply Direct Link To This Post Posted: 17 June 2005 at 3:28am
I tried removing the 256 color version but the result was an invalid icon file.  I tried removing the WinXP image but the result was a blurred icon on the table which wasn't consistent with the original 256 color version.  I also tried using bitmap files but the ReportControl became unresponsive.

After more experimenting, I realized that there was one thing I was doing different from the sample applications.  My program uses a lot of icon and image files so I put all of them in a single resource file.  I was loading the icons into the ImageList and ImageManager directly from the resource file using the built-in function LoadResPicture().  I added a step where the icon file is outputed to a temporary file and then read into the ImageList and ImageManager.  The icons now appear fine in both the IDE and compiled version of the program.

Something about loading the icons directly from the resource file causes the ReportControl to display them incorrectly in when the program is compiled.  None of the other CodeJock controls appear to have this problem.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.172 seconds.