GetImage method of ImageManager
Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=5418
Printed Date: 20 June 2025 at 5:33am Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com
Topic: GetImage method of ImageManager
Posted By: pxpx
Subject: GetImage method of ImageManager
Date Posted: 03 November 2006 at 4:50am
Hi everyone :) i'm developing a vb6 app, and i did these steps:
1. found nice images 2. scaled those images to 16x16 and 32x32 3. created an icon for each image, which includes FOUR formats (the two written above, each one with 8bpp and 32bpp (alpha)) 4. added those icons to the ImageManager ocx
now, this is my question: how can i choose which one i should use? i know i can use GetImage, but it allows me to retrieve just the SIZE i want, and not the COLOR DEPTH.. i need this because i must use these images as StdPicture objects (i can't paint them directly over another control with the objIcon.Draw method).. so i tought that i could use objIcon.CreatePicture method, but as Mr. Oleg told me, that method doesn't work with alpha images.
please turn the lights on :) dany
|
Replies:
Posted By: ijwelch
Date Posted: 03 November 2006 at 11:04pm
I don't think the ImageManager control is going to do what you want.
Here's what I do:
1. add your icons to a resource file. The vb6 resource builder won't let you add alpha icons so you'll need to use an external resource compiler.
2. create a system image list, load your resource icons into it, and paint from there.
Here's a sample app that demonstrates how to do this: http://www.planetsourcecode.com/vb/scripts/ShowCode.asp?txtCodeId=66575&lngWId=1
and here's the article I learnt from: http://www.vbaccelerator.com/home/Vb/Code/Controls/ImageList/Displaying_Alpha_(32bit)_Icons_with_ImageLists/article.asp
|
Posted By: pxpx
Date Posted: 08 November 2006 at 8:34am
thanx for your answer :)
ok, i understood what you're saying. i use the ImageManager OCX because
i need it for the toolbars and the statusbars too, and i wanted to apply the same images it has on other controls.
if i use an imagelist this is the problem: i can't have different formats for each image under the same Key.
so... i guess i must find an alternative way.
thanx again ]px[
|
|