From Xojo Documentation

Property (As Picture )
aBevelButton.Icon = newPictureValue
PictureValue = aBevelButton.Icon

Supported for all project types and targets.

The name of the graphic to use as the icon.


Drag the graphic to the Project Editor or import it using File ↠ Import. Icon supports pictures from any source, including those created at runtime with the Picture constructor. It also supports transparency, either by setting the Transparent property of the Picture to 1 or via the Picture’s Mask.

Sample Code

The following code places an icon in the bevelbutton, aligns it, and specifies the placement of the caption. The image, "DatabaseQuery," has been added to the project.

Me.Icon = DatabaseQuery
Me.IconAlign = 6
Me.CaptionAlign = 0
Me.CaptionPlacement = 2
Me.IconDX = 2
Me.IconDY = 1