Hey,
Forgive me for bump, but I spent forever searching on google for this answer and could never find it. So I spent more time trying to figure it out for myself, and I have managed to do it!
Solution:
picuser.Image = My.Resources.ResourceManager.GetObject("RESOUCE NAME AS STRING")
Peace.
> On Friday, May 04, 2007 10:14 AM J?rgen Heyn wrote:
> Good afternoon,
>
> I would like to display a bitmap in a PictureBox which is stored in a
> resource file.
>
> The following code works perfectly:
> picUser.Image = My.Resources.ResUserIcon01.x48_Crewmember
>
> From a database the application retrieves a string:
> "x48_Crewmember" (or "ResUserIcon01.x48_Crewmember")
>
> How can I display the bitmap in a PictureBox using this string?
>
> I could do ist with the following:
> Select Case True
> Case strBildname = "x48_Crewmember"
> picUser.Image = My.Resources.ResUserIcon01.x48_Crewmember
> ...
> End Select
>
> Because of the number of bitmaps there must be a more elegant way.
> Thank you for any hint.
> Best regards
> J?rgen Heyn, Wilhelmshaven, Germany
>> On Monday, October 11, 2010 1:00 PM James Wragg wrote:
>> Hey,
>>
>>
>>
>> Forgive me for bump, but I spent forever searching on google for this answer and could never find it. So I spent more time trying to figure it out for myself, and I have managed to do it!
>>
>>
>>
>> Solution:
>>
>>
>>
>> picuser.Image = My.Resources.ResourceManager.GetObject("RESOUCE NAME AS STRING")
>>
>>
>>
>> Peace.
>>> On Monday, October 11, 2010 1:02 PM James Wragg wrote:
>>> Hey,
>>>
>>>
>>>
>>> Forgive me for bump, but I spent forever searching on google for this answer and could never find it. So I spent more time trying to figure it out for myself, and I have managed to do it!
>>>
>>>
>>>
>>> Solution:
>>>
>>>
>>>
>>> picuser.Image = My.Resources.ResourceManager.GetObject("RESOUCE NAME AS STRING")
>>>
>>>
>>>
>>> Peace.
>>> Submitted via EggHeadCafe - Software Developer Portal of Choice
>>> Lucene.Net Indexing Searching Entry Level Tutorial
>>> http://www.eggheadcafe.com/tutorials...-tutorial.aspx