Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - GetImage method of ImageManager
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

GetImage method of ImageManager

 Post Reply Post Reply
Author
Message
pxpx View Drop Down
Newbie
Newbie


Joined: 03 November 2006
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote pxpx Quote  Post ReplyReply Direct Link To This Post Topic: GetImage method of ImageManager
    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


Back to Top
ijwelch View Drop Down
Senior Member
Senior Member


Joined: 20 June 2006
Status: Offline
Points: 262
Post Options Post Options   Thanks (0) Thanks(0)   Quote ijwelch Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
pxpx View Drop Down
Newbie
Newbie


Joined: 03 November 2006
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote pxpx Quote  Post ReplyReply Direct Link To This Post 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[
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.078 seconds.