Xojo Conferences

Platforms to show: All Mac Windows Linux Cross-Platform

IconStringToPictMBS(icon as String, bitDepth as Integer, size as Integer) as Picture
Type Topic Version
global method Icon Service
Function: Converts an icon into a Picture so that you can display it within the REALbasic environment.
dim icondata as string
dim p as Picture

p=IconStringToPictMBS(icondata, 8, 32)
To see how it is used, look at the method DisplayTheFileIcon in the included REALbasic demo project.
Currently this function only creates a Picture from the Icon's Image, and does not consider the Icon Mask. The Mask is always right behind the Icon Image, in case you want to get that, too.
Size is the width and height of the icon which must be equal. If you need something other, please ask.

Feedback, Comments & Corrections

MBS Xojo Chart Plugins