HighTechTalks DotNet Forums  

How to handle resource in multiple forms

Dotnet Internationalization microsoft.public.dotnet.internationalization


Discuss How to handle resource in multiple forms in the Dotnet Internationalization forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Ghanashyam
 
Posts: n/a

Default How to handle resource in multiple forms - 08-29-2006 , 07:12 AM






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.

Reply With Quote
  #2  
Old   
Garrett McGowan[MSFT]
 
Posts: n/a

Default RE: How to handle resource in multiple forms - 09-15-2006 , 08:33 PM






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
--------------------

Quote:
From: Ghanashyam (AT) discussions (DOT) microsoft.com
Subject: How to handle resource in multiple forms
Date: Tue, 29 Aug 2006 04:12:02 -0700
Newsgroups: microsoft.public.dotnet.internationalization

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.



Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.