StatusBar Panel and adding an .bmp image from an imagelist 
Author Message
 StatusBar Panel and adding an .bmp image from an imagelist
Hello,

I am trying to figure out a way to add an image that is within my imagelist
to a panel that is on my statusbar.

The .icon Property of panel is handy, but I don't want to include the image
in the exe path , I want to store my images in an image list, and I am
having the most difficult time finding a work around.

Any Help would be most appreciated.



Fri, 04 Mar 2005 22:30:54 GMT  
 StatusBar Panel and adding an .bmp image from an imagelist
Well,

THere was an easier way to this answer, and I thought I would post it for
any future inquiries.

Instead of using the drawitem event that a statusbar has..... I just
converted the .bmp file that sat in my imagelist to an icon.   THe following
code handles the conversion.. I originally attempted a cytpe of a bmp to
icon, but it didnt like that to well...

Use this conversion code instead to assign the icon property of a statusbar
from an imagelist

Dim oIcon As Icon
oIcon =  Icon.FromHandle(CType(ImageList1.Images(10), Bitmap).GetHicon)

Statusbar1.panel(index).Icon = oIcon


Quote:
> Hello,

> I am trying to figure out a way to add an image that is within my
imagelist
> to a panel that is on my statusbar.

> The .icon Property of panel is handy, but I don't want to include the
image
> in the exe path , I want to store my images in an image list, and I am
> having the most difficult time finding a work around.

> Any Help would be most appreciated.



Sat, 05 Mar 2005 02:34:46 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Toolbars: ADDING BMP images to IMAGELIST

2. Adding Picture AND Text to a StatusBar Panel

3. Statusbar Panel Problem with the INS panel

4. Scaling images for adding into a ImageList/ListView

5. add images to the imagelist control at runtime?

6. how to add dynamic create image into imagelist?

7. ProgressBar into Panel of StatusBar

8. ProgressBar into Panel of StatusBar

9. statusbar panel text color

10. statusbar panels

11. Changing the backcolor of a statusbar-panel

12. StatusBar text in Panels

 

 
Powered by phpBB® Forum Software