Report Control: Icons in compiled program |
Post Reply |
Author | |
nighthawk
Senior Member Joined: 11 June 2004 Status: Offline Points: 167 |
Post Options
Thanks(0)
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? |
|
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
I would suggest trying to use the ImageManager (ReportControl.Icons),.
|
|
nighthawk
Senior Member Joined: 11 June 2004 Status: Offline Points: 167 |
Post Options
Thanks(0)
|
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? |
|
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
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.
|
|
nighthawk
Senior Member Joined: 11 June 2004 Status: Offline Points: 167 |
Post Options
Thanks(0)
|
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. |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
May be the problem in bitmap? Can you upload it to check?
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
nighthawk
Senior Member Joined: 11 June 2004 Status: Offline Points: 167 |
Post Options
Thanks(0)
|
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 |
|
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
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.
|
|
nighthawk
Senior Member Joined: 11 June 2004 Status: Offline Points: 167 |
Post Options
Thanks(0)
|
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. |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |