When you don't want to do to fancy stuff you can just inhire the Button class and override the Paint method. Then just paint the Bitmap on the Button and you are done
public class MyButton : Button { private Image _image;
public MyButton() { _image = Image.FromFile( @"c:\image.bmp" ); }
Custom 3D, Irregular Shaped Buttons
Ramana Kumar
This will do only rectangular buttons right If my graphic has a transparent layer then how do I handle that
--Yatharth--
Rena
QATester01
public class MyButton : Button
{
private Image _image;
public MyButton()
{
_image = Image.FromFile( @"c:\image.bmp" );
}
protected override void OnPaint( PaintEventArgs e )
{
e.Graphics.DrawImage( _image, 0, 0, Widht, Height );
}
}