VB - Display a bitmap on T35 display from Resources

I have added a small bitmap (30 pixels x 30 pixels) to the project resources folder and wish to load it onto the T35 display. I have guessed at setting properties for the bitmap as “Build Action: Embedded Resource” and “Copy to Output: Copy Always”.

My VB code looks like this so far and doesn’t work.

Dim picture As Bitmap
        picture = New Image("BlueSlider.bmp")
        Display.SimpleGraphics.DisplayImage(picture, 0, 0)

Any help much appreciated.The only information I have relates to loading images from an SD card. I would rather not do so for this project.
Mainboard used is a Fez Spider.

Thanks Andre but VB not happy with that. I have tried several variants but doesnt like “properies” or “BinaryResources”

Try:

Resources.GetBitmap(Resources.BitmapResources.Image1)

Use the correct id in place of Image1

Tried

 picture = New Image(Resources.GetBitmap(Resources.BitmapResources.BlueSlider.bmp))

but returns error:

‘BitmapResources’ is not a member of 'Resources

and

‘GetBitmap’ is not a member of ‘Resources’

You need to add bitmap file using the resource manager.
As soon as you do that VS will generate all missing code.

The name should match your recource name, not the filename, see screenshot attched.

Hi, you might be hitting this problem:

It’s a namespace issue around resources.

Jas

And 1 line extra :

it’s not enough only add the bitmap to the folder.
you have to doubleclick the “Resources.resx” in the project-explorer and then using the “add” function to register the resource