Okay - as many people suggested I created an imagelist and added my 3 pictures to it (as shown in the code below).
Problem I am having now, no clue how to get these now added images as background images to my buttons.
(...if only ImageButtons existed...)
Specifically - I have 3 buttons (btnStart, btnPause, btnStop) and I want to display the corresponding START, PAUSE, STOP images as their background.
But I have no clue how to a) use the imagelist images I just added and b) set a background image to a button via code.
As you can see, I loaded my images... now what? How do I use them? How to I set them as the background image for the buttons?
Thanks - I know I am asking for a lot but can't see to figure this part out, any help/hints would be appreciated.
Problem I am having now, no clue how to get these now added images as background images to my buttons.
(...if only ImageButtons existed...)
Specifically - I have 3 buttons (btnStart, btnPause, btnStop) and I want to display the corresponding START, PAUSE, STOP images as their background.
But I have no clue how to a) use the imagelist images I just added and b) set a background image to a button via code.
Code:
private System.Windows.Forms.Button btnStart;
private System.Windows.Forms.Button btnPause;
private System.Windows.Forms.Button btnStop;
private System.Windows.Forms.ImageList imglst;
...
// Add Images to ImageList and display on buttons
imglst.Images.Add(Image.FromFile("C:\\img\\Play.png"));
imglst.Images.Add(Image.FromFile("C:\\img\\Pause.png"));
imglst.Images.Add(Image.FromFile("C:\\img\\Stop.png"));
btnStart.?
btnPause.?
btnStop.?
As you can see, I loaded my images... now what? How do I use them? How to I set them as the background image for the buttons?
Thanks - I know I am asking for a lot but can't see to figure this part out, any help/hints would be appreciated.