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;

 

Feel free to comment if you can add help to this page or point out issues and solutions you have found. I do not provide support on this site, if you need help with a problem head over to stack overflow.

Comments

Your email address will not be published. Required fields are marked *