473,854 Members | 1,471 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Me vs. VS2003 IDE: Killing my satellites softly

Hello board,

I just started looking into C# - programming and find it quite applicable for very rapid development scenarios. But the handy
support that the IDE provides has now run me into problems with localization.

I started out very simple with a form called MainForm that is displayed but disabled. This form immediately starts a second form
called "LoginDialo g" which contains the usual labels, textBoxes and buttons. It connects to a SQL-Server database to verify login
credentials and - if appliciable - after a couple of seconds closes itself and enables MainForm. The LoginDialog contains a label
which initially contains no text but - after successful login - displays a string like "Welcome" and some user-information fetched
from the database. If the login credentials cannot be verified against the database it shall display a failure message like e.g.
"Wrong username and/or password".

So far all this worked pretty fine and could be created within very short time with the IDE. Then, I started localizing the from and
that's where I encountered a dead-end.

To localize I first used the IDE by making the LoginDialog-form localizable, switching the Language-property of the form and setting
different values to the Text-properties of the elements. I could observe how the IDE created resource-files like e.g.
"MyApp.LoginDia log.resources", "MyApp.LoginDia log.fr.resource s" in the project directory, created subdirectories like "fr" and in
there the "MyApp.resource s.dll" satellite-assembly. Within the InitializeCompo nents()-method in the LoginDialog-class the IDE uses
the ResourceManager (type)-constructor to create a Resource Manager of type "LoginDialo g". All this works out well.

But now I would need some extra localized variables (e.g. for the Welcome-string or the failure-message mentioned above) which do
not appear as elements within the form. First, I tried to be clever and to add some values to the .resources-files with WinRes.exe.
But every time I touch the form in the designer-view the .resources-file is built anew and my entries are gone. Next, I tried to
build my own .resources-files with the entries for the necessary variables, compile them with Al and place the satellite-assemblies
in the correct subdirectory. But since the names of the files have to follow a strict convention I suppose that my DLLs are
overwritten by the IDE upon building the project (the IDE of course follows this convention).

The question is now: How can I add localized variables to my form which are not elements (controls or components) of the form? Of
course throughout a localized application you need more variables (mostly strings) localized than just the controls or components
within the forms.

Is it the only possibility to set the form in the designer to not localizable (which removes all resp. code from
InitializeCompo nents), delete the auto-generated .resources and .dll-files, then create my own .resources-files and assemblies, use
my own Resource Manager within InitializeCompo nent() and manually set the properties of all elements in the form? In this case it
would be very tedious to incorporate all the localized information for the controls (like button-size, -position ...) in my own
assemblies manually. The IDE does a very good job here but it will be useless if I cannot add my own localized variables.

Maybe someone has a clue on how to solve this problem.

Best regards
Rolf

Nov 17 '05 #1
3 1506
One correction to my former description:

I did not open the IDE-created .resources-files with WinRes or ResEditor (which both will not work on IDE-created .resources-files)
but I edited the .resx-files directly from within the IDE. Upon building these will be overwritten by the IDE based only on the
elements within the form.

Regards
Rolf
Nov 17 '05 #2
Additional information:

I just tried what I described in the first post (setting the form to not localizable and creating a satellite assembly by myself).

But even in this case I can see, that the MyApp.resources .dll in the fr-subdirectory is overwritten by the IDE upon building the
project.

Now I tried the following:

I built the project (resources are aquired by ResourceManager (typeof(LoginDi alog)).

Then I used Al to recreate the MyApp.resources .dll in fr-subdirectory from MyApp.LoginDial og.fr.resources . This file contains only
one value I defined myself. In LoginDialog it is set as text-property of one label. I also copied MyApp.resources .dll to the
bin\Debug\fr-directory.

I then manually started MyApp.exe from the bin\Debug-directory, but the self-defined value could not be found, the label had no
text.

Starting MyApp.exe from the obj\Debug-directory was successful: The label had the correct text defined in my .resources-file, all
other elements fell back to the invariant language like they should.
Can anyone explain to me what that means and how I should deal with this?

Thanks
Rolf
Nov 17 '05 #3
Well, still waiting for some answers or questions...

But I can provide for an update:

As described in the other Thread ("Me vs. VS2003 IDE Part 2) I can now (at least symptomatically ) explain how the MyApp.exe's in
bin\Debug-directory and obj\Debug-directory differ in behaviour. To cut it short: It is about the MyApp.exe.confi g-files (for
details see other Thread).
What I have tried regarding the problem of localizing variables of a form which are not controls or components is the following:

Modifying the .resx-files with XML-editor is one way, but it is a very hard restriction that afterwards you are not allowed to
change the language-property of the form to avoid overwriting your own amendments to at least the .resx-file of the currently
selected language.

Regarding localization the documentation suggests that you first finish developing your application an then e.g. pass the neutral
..resx-file to a localizing vendor. If I would follow this path I would develop only in neutral language, then add localized
information by changing the language-property of the form and finally edit the localized .resx-files before building the release.

But I think that it is very hard to figure out a point where you can say: "I will surely never alter any details of my applicaton".
If I follow this path, after providing my own localization information to the .resx-files the application is "shut" and I can never
change or add any elements which are localized because then I would have to change the form's language-property and all my entries
in the various .resx-files would be lost.

Since I found it not applicable to CREATE satellite-assemblies with my own resources (because they are overwritten by IDE at
building the project) I tried to ADD my own resources-information to the IDE-generated satellite-assemblies.

I found that this will work out (at least for all localized languages but not for the neutral language).

AFTER building the project I use "Al /link" instead of "Al /embed" and simply add my self-created .resources-files (they can be
named anything as I found out) to the IDE-generated MyApp.resources .dll's in the various language-subdirectories.

Of course, rebuilding the project will revert the satellite-assemblies to the IDE-generated form but I can always add my part of
resources after building the project this way whenever I like. Thus, the application is never "shut".

I regard this as a very inconvenient way of localizing variables being no control or component within a form but it seems to be the
only one.

Still, I have to figure out how to add localization-values of such variables to the neutral language since for this the IDE does not
use a MyApp.resources .dll (within the project directory) but simply the .resources-files.
Best regards
Rolf
Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1566
by: Rolf Molini | last post by:
Hello everybody, I put this in a separate thread because altough it is connected to the localization-problem in my former thread this is a completely different "joke" of the IDE. While waiting for some hint on how to include my own ressources in IDE-generated satellite-assemblies (because there can only be on assembly per each language) I decided to try to use the XML-editor for the IDE-generated .resx-files again. I noticed that the...
3
1171
by: Jeff F | last post by:
I've got a MFC solution that appears to cause the VS2003 IDE to lockup when attempting any of the aforementioned actions. I've tried deleting ..ncb and .aps files with no effect. Any help is appreciated. Thanks, Jeff F
14
1197
by: Dennis | last post by:
I have a form that had a button called but_Edit which had it's visible property set to False. I have been working on an applicaiton using this form for some time and all was going well and it ran fine and I could use the but_Edit control making it visible when I wanted and etc. However, it suddenly disappeared and I could no longer reference but_Edit in code. The Form Designer code still had all the information showing where it was...
39
2555
by: clintonG | last post by:
This is not about starting a fight but an observation that seems to be proving itself on its own merit and is therefore simply a point of conjecture. I did not get serious about writing software until I learned ASP/VBS (if that can be called writing software) as my focus was and remains for the most part developing for the web. Even though I have had a programming class in C which I somehow passed, JavaScript always gave me the heeby...
2
1724
by: Carlo \(MCP only\) | last post by:
Hi to all I'm askyng you a suggestion about the best way to share the same source code between VS2003 and VS2005. The project I'm developing is a controls and components library, and the Solution.sln includes a standard WindowsForms application for testing pourposes. What I need is an efficient and reliable way to edit and test the DLL assembly in both environments, since the library will be distributed for Framework 1.1 and 2.0.
5
2234
by: Tony | last post by:
Hi all, Here's the link to the issue we were seeing on our ASP.NET system when modifying, adding and deleting directories in framework 2.0. http://blogs.msdn.com/toddca/archive/2005/12/01/499144.aspx I then tried a few of solution I found while perusing Google, - FCNMode registry mod - Relocating to App_Data folder to create/modify/delete directories.
2
1773
by: holysmokes99 | last post by:
I am developing a component in .Net 1.1, and want to debug it using the "start external program" of the debugger in the IDE. The program I want to start references both 1.1 and 2.0 components. The problem is that when I launch this from VS2003, the external program starts only for a moment and then bails out of memory with no error, and the ide returns to a stopped state awaiting my input. If I remove the 2.0 framework, at least the...
3
1360
by: David Wilkinson | last post by:
Apart from the loss of the ClassWizard for MFC work, the thing I have disliked most about the VS2003 IDE is that I have never been able to arrange the windows in a way that I like. I have just obtained a new 1680x1050 widescreen monitor, and I would like to revisit this issue. In VC6 I have the windows arranged in two rows. In the top row, the "Workspace window" is on the left and the main Edit window is on the right; the tabs for the...
13
1387
by: active | last post by:
With VS2005 the windows form designer uses the files *.Designer.vb I hope no one at MS is reading this because I know it will upset them to know - I like the old way better! I've been looking at the Options available for the Windows Form Designer and do not see one that would give me the older method. Is there such an option?
0
9901
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9751
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11024
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10756
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9513
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7914
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5741
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5941
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3186
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.