![]() |
GetImage method of ImageManager |
Post Reply ![]() |
Author | |
pxpx ![]() Newbie ![]() Joined: 03 November 2006 Status: Offline Points: 6 |
![]() ![]() ![]() ![]() ![]() 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 |
|
![]() |
|
ijwelch ![]() Senior Member ![]() Joined: 20 June 2006 Status: Offline Points: 262 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
|
pxpx ![]() Newbie ![]() Joined: 03 November 2006 Status: Offline Points: 6 |
![]() ![]() ![]() ![]() ![]() |
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[ |
|
![]() |
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 |