Thanks for your suggestion.
I did some more work and I found that the resouirce is actually there but
when I try to read it i am getting the following error:
An unhandled exception of type
'System.Resources.MissingManifestResourceException' occurred in mscorlib.dll
Additional information: Could not find any resources appropriate for the
specified culture or the neutral culture. Make sure
"test_win_form.MainForm.resources" was correctly embedded or linked into
assembly "test_win_form" at compile time, or that all the satellite
assemblies required are loadable and fully signed.
what is culture?
best regards
> Thanks for your suggestion.
> I did some more work and I found that the resouirce is actually there but
[quoted text clipped - 9 lines]
>
> what is culture?
If you want users from different countries to be able to use your
application in their native language, you can use localization.
if you look at the propery page of your windows form, there is a property
called language. if you select a language there, every make-up action you
perform on the form will be tied to that language.
For example, in your case this would mean that you would have 2 pictures for
2 languages. the language is determine by the localization settings in the
windows control panel.
If the program runs on a computer for which there is no specific resource,
the program will try to load the language 'neutral' resource.
I suggest you do the following: In your resource file (if you right click it
in the solution explorer ->view code) you can see the language for which the
picture was added. In my project this is neutral (the default setting).
My guess is that whatever you find there is not neutral, and different from
the locale of your machine.
When you start your app, the program will try to load the resource for the
locale of your machine, does not find it, tries to load the neutral resource,
cannot find it and finally throws an exception.

Signature
Kind regards,
Bruno.
bruno_nos_pam_van_dooren@hotmail.com
Remove only "_nos_pam"
ma - 13 Mar 2006 10:14 GMT
Thanks for your good explanation.
I check and found that the language of my form is default and in the
resource the culture is neutral
See the extract from my form resource:
assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="pictureBox1.Image" type="System.Drawing.Bitmap, System.Drawing"
mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
What should I do now?
Best regards
Bruno van Dooren - 13 Mar 2006 10:48 GMT
> Thanks for your good explanation.
>
[quoted text clipped - 14 lines]
>
> Best regards
This should be OK.
Btw I just realized that your form has localization disabled .otherwise you
won't get the explicit initialization of the picturebox directly in your code.
However, your code contains this:
resources->GetObject(L"image1.Image")));
but your resource file contains this:
<data name="pictureBox1.Image"
the names don't match. there is no image1.image in your resource file.
try to change the name of the resource that initializecomponent tries to
load to the name that is in your resource file. they should be the same.

Signature
Kind regards,
Bruno.
bruno_nos_pam_van_dooren@hotmail.com
Remove only "_nos_pam"