Using resources (resx) in VB.NET
Hi,
I've been trying to use resources in VB.NET for the past 4 hours without any luck...
I added a resource file to my project, called iConvert.resx, then I added a string to it:
name: test, value: eureka!, comment: (null), type: String, mimetype: (null)
Then, using this code:
VB Code:
Module MMain
Public gresMan As Resources.ResourceManager = New Resources.ResourceManager("iConvert", System.Reflection.Assembly.GetAssembly(GetType(MMain)))
Sub Main()
MessageBox.Show(gresMan.GetString("test"))
End Sub
End Module
I get an error telling me to make sure I linked/compiled iConvert.resources...
Help me please!
Re: Using resources (resx) in VB.NET
Right...i am absolutely confused by resource manager...
how do you create one ?
I need to put all my images into one .resx file...
how?????
grrr :(
Re: Using resources (resx) in VB.NET
Wow, this is a very old thread, but perhaps this will help someone using VB.NET 2005.
Right-click 'Project Properties' in the Solution Explorer
Select ADD, then NEW ITEM
Select 'Resources File'
Choose 'Add Resources' and select the images you want to embed (Image1.jpg)
In your application, add a PictureBox (PictureBox1)
In your code, add the following in the proper context with what you are doing:
PictureBox1.Image = My.Resources.Images.Image1