-
April 3rd, 2008, 08:12 PM
#1
[RESOLVED] get image from Properties.Resources
Hi,
I currently using the below code to assign image from Resources to menu.
rm = new RibbonMenu();
rm.Text="Search";
rm.LargeImage = Properties.Resources.search;
can i replace "Properties.Resources.search" with a variable? something like this:
string imgName="search";
rm = new RibbonMenu();
rm.Text="Search";
rm.LargeImage = imgName;
Please help.
Thanks
-
April 3rd, 2008, 08:48 PM
#2
Re: get image from Properties.Resources
Hi Yolip,
How about this?
Code:
string imgName = "Search";
Bitmap bmp = (Bitmap)Properties.Resources.ResourceManager.GetObject(imgName);
rm = new RibbonMenu();
rm.Text="Search";
rm.LargeImage = bmp;
Last edited by mckee.kyle; April 3rd, 2008 at 08:51 PM.
-
April 3rd, 2008, 10:32 PM
#3
Re: get image from Properties.Resources
Thank you! you are my legend
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|