How would i convert an Bitmap to an Icon. I cant fiure i out.
tayspen 28 <Insert title here> Team Colleague
Recommended Answers
Jump to PostYou need to use the System.Drawing namespace. Something like this should get you started:
Bitmap b = new Bitmap(@"C:\WINDOWS\Blue Lace 16.bmp"); IntPtr hIcon = b.GetHicon(); Icon i = Icon.FromHandle(hIcon);
Jump to PostWherever you want it to go... it's only an icon object. If you want to save it to disk, then you would add code to do that (use the "Save" method of the Icon object). If you want to set the icon as the icon of your form, you would …
Jump to PostPlease spell out all your words; otherwise we can never communicate clearly.
I've shown you how to convert a bitmap into an icon. I've shown you that you can save the icon to disk, if you like, using the .Save method of the System.Drawing.Icon object. I've also shown you …
Jump to PostDid you look at the documentation for the "Save" method? I'm not trying to be mean, but if you want to be a succesful programmer, you'll have to learn to read documentation, plus (a personal pet peeve of mine), type and punctuate clearly. You can't refuse to read documentation, and …
All 13 Replies
tgreer 189 Made Her Cry Team Colleague
tayspen 28 <Insert title here> Team Colleague
tgreer 189 Made Her Cry Team Colleague
tayspen 28 <Insert title here> Team Colleague
tgreer 189 Made Her Cry Team Colleague
tayspen 28 <Insert title here> Team Colleague
plazmo 1 Posting Whiz in Training
tayspen 28 <Insert title here> Team Colleague
tgreer 189 Made Her Cry Team Colleague
tayspen 28 <Insert title here> Team Colleague
tayspen 28 <Insert title here> Team Colleague
plazmo 1 Posting Whiz in Training
tayspen 28 <Insert title here> Team Colleague
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.