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.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Iftikar HussainPosted Jul 20, 2013, 1:56 AM
Regards,
Iftikar
Vasu GadhiyaPosted Jul 20, 2013, 8:15 AM
its completely Working.
thank you very much.
Vasu GadhiyaPosted Jul 20, 2013, 1:43 AM
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'
Iftikar HussainPosted Jul 20, 2013, 1:33 AM
Regards,
Iftikar
Vasu GadhiyaPosted Jul 20, 2013, 12:24 AM
myitem.Image = System.Drawing.Image.FromFile("pro.Properties.Resources.wheth_1");
not Working..
Iftikar HussainPosted Jul 19, 2013, 9:09 AM
You can try like this
myitem.Image = System.Drawing.Image.FromFile(@"C:\yourimagefilepath");
Regards,
Iftikar