Creating Images

PNG with transparancy

DPI = 72

If using a normal 3D button the button size will need to be the image resolution + 6

Buttons With No Border (Just image but no mouse over or click effect)

Button properties

Text = [blank]

Image = Set Image

FlatStyle = Flat

FlatAppearance > BorderColor = Set to match background (otherwise you get a black border when clicked even if the border width is set to 0)

FlatAppearance > Border = 0

FlatAppearance > MouseDown = Set to match background

FlatAppearance > MouseOver = Set to match background

Buttons With Normal 3D Effect

Button properties

Text [blank]

Image Set Image

Flat Style Flat

Flat Appearance > Border 0

Flat Appearance > Mouse Down Set to match background

Flat Appearance > Mouse Over Set to match background

If you want image and text use image align and text align properties

Irregular shaped image buttons

Good tutorial:

http://www.codeproject.com/KB/buttons/BearForm1.aspx

Changing Button Image

Create an image list with the required images in it (set the required resolution and select 32bit colour).

Select the button and set these properties:

ImageList = select the image list you created.

ImageIndex = select the default image to display

To select the image to be used at runtime:


	btnMyButton->ImageIndex = 1;

 

USEFUL?
We benefit hugely from resources on the web so we decided we should try and give back some of our knowledge and resources to the community by opening up many of our company’s internal notes and libraries through mini sites like this. We hope you find the site helpful.
Please feel free to comment if you can add help to this page or point out issues and solutions you have found, but please note that we do not provide support on this site. If you need help with a problem please use one of the many online forums.