.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month

Home >> Code Snippets >> Windows Form Controls >> Post New Resource Bookmark and Share   

 Subscribe to Code Snippets

Insert image on button

Posted By:Hiren Soni       Posted Date: August 29, 2010    Points: 10    Category: Windows Form Controls    URL: http://www.dotnetspark.com  

Insert image on button

Learn how to insert image in button

-> Set its Image property from the Property window

-> You can set its Image Programmatically

button1.Image= Image.FromFile(@"full_image_path_here");

-> If you already have image in Resources then You can set its image from the Resource Programmatically by this code:

button1.Image = WindowsApplication1_csharp.Properties.Resources.Resource_name;


Further Readings:


No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More code samples in C#, ASP.Net, Vb.Net and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend