if you include the bitmap as an embedded resource in the assembly by adding it in the project and then set the Build Action property for the file to “Embedded Resource” you can use the following code to get the image:
myImage.Image = New Bitmap(Assembly.GetExecutingAssembly().GetManifestResourceStream(“TpsViewXXXXXX.Image.bmp”))
Observe that the complete namespace is necessary to get the resource.
No, I have’t checked if the performance improves. It just makes it simpler to handle the image file. Otherwise you must make sure that the file is available and where it is. If you move the assembly the image follows the assembly if it is embedded. It is also a way of making sure that the customer doesn’t change the image. Also if you do a localized application the image could be placed in a sattelite assembly and loaded in a similar way.
What is the error and how does your source code look like? References OK?