Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do i Convert drawing.image to drawing.icon 2

Status
Not open for further replies.

DTJeff

Programmer
Dec 9, 2003
37
0
0
GB
Hi,

Does anyone know how I can place an image from an imagelist into a statusbar panel?

I stuppidly assumed it was as simple as:
Code:
 Me.Statusbar.Icon = Me.Imagelist.Images(0)

but it doesnt work, it gives me an error stating that it cant convert the types.

Any help would be appreciated.

Thanks.
 
You can get an icon from a bitmap by:
Code:
Me.Statusbar.Icon = Icon.FromHandle(CType(Me.Imagelist.Images(0), Bitmap).GetHicon())
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top