
Icon problem?

3 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Kirtan PatelRank #292 · 8.6K reputationPosted Oct 25, 2009, 6:22 AM EDT
You need to Modify your Image to make it Smaller in Some Graphic Software Like photo shop so it can fit properly in button .
Make it 32x32 size so it can better fit in your button.
or Just choose some other icon 32x32 icon from Get Icon Free From Here there are many good icons there :)
if you try to put image in some other mode like Zoom / Streched by property it will look bad on gui :)
so better to resizing the image :)
Happy Coding :)
please check "do you like this answer" if it helped you :)
Deepak Bhatia142 reputationPosted Oct 25, 2009, 8:15 PM EDT
Just change the property backgound image layout property of button and set it to zoom or something else to see the proper changes.
Rajeswari nathan97 reputationPosted Oct 25, 2009, 9:17 PM EDT
Use the property "BackgroundImage" to set the "image"
then change the property "BackgroundImageLayout" into "Stretch"
Following the code in "InitializeComponent()"
this.button1.BackgroundImage = global::WindowsApplication1.Properties.Resources.aral1;
this.button1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;