myitem.Image = pro.Properties.Resources.wheth_1;
Now,
i want to use
myitem.Image = "pro.Properties.Resources.wheth" + "_1";
its occur error -> Cannot implicitly convert type 'string' to 'System.Drawing.Image'
path.combine Or new Uri Not Working.
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
Iftikar HussainRank #423 · 5.9K reputationPosted Jul 19, 2013, 9:56 PM EDT
Regards,
Iftikar
Iftikar HussainRank #423 · 5.9K reputationPosted Jul 19, 2013, 5:09 AM EDT
You can try like this
myitem.Image = System.Drawing.Image.FromFile(@"C:\yourimagefilepath");
Regards,
Iftikar
Vasu GadhiyaRank #7,540 · 239 reputationPosted Jul 19, 2013, 8:24 PM EDT
myitem.Image = System.Drawing.Image.FromFile("pro.Properties.Resources.wheth_1");
not Working..
Iftikar HussainRank #423 · 5.9K reputationPosted Jul 19, 2013, 9:33 PM EDT
Regards,
Iftikar
Vasu GadhiyaRank #7,540 · 239 reputationPosted Jul 19, 2013, 9:43 PM EDT
and
myitem.Image = pro.Properties.Resources.wheth_1;
Working, but i use like this,
myitem.Image = "pro.Properties.Resources.wheth" + "_1";
its occur error -> Cannot implicitly convert type 'string' to 'System.Drawing.Image'
Vasu GadhiyaRank #7,540 · 239 reputationPosted Jul 20, 2013, 4:15 AM EDT
its completely Working.
thank you very much.