开发者

Why does toolbar icons in VB6 looks worst in quality when running as an EXE?

I have a toolbar in a VB6 editor program which has a 24*24 icons in 24bits color. I put in the photos in a res. resource file and load them into the program via loadImage.

t开发者_运维技巧he problem is i can see the icon quality looks good running in debug mode but when i compile the program into an exe, there's a severe degradation going on.

I heard from my senior that there's something inside the visual studio which will automatically decrease the quality of the image inside.

Is this true? and if not, what is happening here? And more importantly, how do i work around this?

thanks!!


Yes, there is an issue with VB6, as it simply does not know a lot about high color images. I fought this battle long and hard and eventually found a fix.

The key to the whole problem is the ImageList control, so get a replacement one: http://www.vbaccelerator.com/home/VB/Code/Controls/ImageList/index.asp

Then get yourself a new toolbar and/or command bar that works with that imageList: http://www.vbaccelerator.com/home/VB/Code/Controls/Command_Bar/index.asp http://www.vbaccelerator.com/home/VB/Code/Controls/Toolbar/index.asp

With these tools you won't lose color fidelity.


So are you adding icons to your resource file or bitmaps? I do remember VB reducing a custom cursor to monochrome during runtime. I did a quick test app and added some bit maps to a resource file, then used,

Command1.Picture = LoadResPicture(101, vbResBitmap)

to load the picture into a command button on a toolbar and they looked as good in debug or as an exe. If that isn't a solution for you or is way off base, if you can add some more detail I will look at it some more.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜