I have a windows application that consists of multiple forms.If I maintain a
resource file for each form and keep the name in resource file to resemble
the form elements as below then wizard generated code in
InitializeComponent() brings these resources correctly for each form.
label1.Text = "Welcome to Main Form"
Instead of keeping many resource files,I would like to keep one resource
file for entire application and at the same time what name value pair sould
be there in resource file so that wizard generated InitializeCOmponent() will
be able to get those resource.I want to avoid doing UI changes using
ResourceManager.GetString("001").ANy help in this regard is highly
appreciated.
Thanks.
Garrett McGowan[MSFT] - 16 Sep 2006 01:33 GMT
Let's make sure I understand your scenario:
You would like to 1) maintain a single resource file across all the
application's forms and 2) ensure that the Designer-generated code will be
able to load from this resource file.
If I understand your request correctly, then I'm afraid this isn't
supported. While you can maintain an application-level resource file for
strings and the like, the WinForms Designer-generated code controls each
form's properties.
Garrett McGowan [MSFT Developer International]
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
--------------------
>From: Ghanashyam@discussions.microsoft.com
>Subject: How to handle resource in multiple forms
[quoted text clipped - 13 lines]
>appreciated.
>Thanks.