Click here to Skip to main content
15,900,973 members
Home / Discussions / C#
   

C#

 
GeneralRe: struct/class .vs. Datasets Pin
Heath Stewart22-Apr-04 4:40
protectorHeath Stewart22-Apr-04 4:40 
GeneralRe: struct/class .vs. Datasets Pin
BernardYardley22-Apr-04 4:52
BernardYardley22-Apr-04 4:52 
Generalshowing a bitmap Pin
Amirjalaly21-Apr-04 21:55
Amirjalaly21-Apr-04 21:55 
GeneralRe: showing a bitmap Pin
Mazdak22-Apr-04 0:48
Mazdak22-Apr-04 0:48 
GeneralCreating object instance only known object name Pin
PEDRO_PASAMAR21-Apr-04 21:01
PEDRO_PASAMAR21-Apr-04 21:01 
GeneralRe: Creating object instance only known object name Pin
Bilal Farooq21-Apr-04 22:20
Bilal Farooq21-Apr-04 22:20 
GeneralUsing Images of Satellite Assemblies Pin
Bilal Farooq21-Apr-04 19:54
Bilal Farooq21-Apr-04 19:54 
GeneralRe: Using Images of Satellite Assemblies Pin
Heath Stewart22-Apr-04 3:29
protectorHeath Stewart22-Apr-04 3:29 
You're close. First, read Resources in Applications[^] in the .NET Framework SDK.

Satellite assemblies are different from primary assemblies, which contain modules. Satellite assemblies contain only resources and they do define a locale in the MANIFEST (a la AssemblyCultureAttribute).

The way things are named is also important. For example, if you put the neutral language resources in your primary assembly as MyStuff.resources, then the resources in the satellite assemblies must be MyStuff.de.resources (for culture-independent German - something I use quite a bit). The assembly itself must either be MyAssembly.de.dll and/or MyAssembly.dll in a "de" sub-directory.

Once you've got that down, you're on track putting the images in the ResX files (most likely using base64 encoding, which is a good idea for binary data). You can also serialize anything which has a TypeConverter associated with it that can convert to/from strings, like Location and Size properties.

To get a good feel of how all this ties together, try a localization sample using VS.NET. Create a form, set the Localized property to true and design your form using the neutral language, then switch to a new language and override whatever you want. Show hidden files on your project and take a look at them. VS.NET can help with a lot of these tasks, even if you don't use localization functionality provided by the designer (which I don't, because it localizes everything with the LocalizationAttribute set to true, which is quite a lot, making the code run pretty slowly). Finally, compile your example and look at the assembly output, including the MANIFEST for each which you can easily see using ildasm.exe from the .NET SDK).

One more thing: use the NeutralResourcesLanguageAttribute with the culture-specific language (ex: "en-US") so that the Fusion component of the .NET Framework doesn't go looking for your resources contained in your primary assembly, which takes a little extra time - which can be significant when you use touchless-deployment over the web like we're doing with our application.

 

Microsoft MVP, Visual C#
My Articles
GeneralGet currently active window Pin
Bilal Farooq21-Apr-04 19:42
Bilal Farooq21-Apr-04 19:42 
GeneralRe: Get currently active window Pin
A.Wegierski22-Apr-04 0:26
A.Wegierski22-Apr-04 0:26 
GeneralRe: Get currently active window Pin
Bilal Farooq22-Apr-04 3:29
Bilal Farooq22-Apr-04 3:29 
GeneralRe: Get currently active window Pin
Heath Stewart22-Apr-04 3:39
protectorHeath Stewart22-Apr-04 3:39 
Generalauto+indentation feature Pin
kumaru_san21-Apr-04 19:04
kumaru_san21-Apr-04 19:04 
GeneralRe: auto+indentation feature Pin
leppie22-Apr-04 7:29
leppie22-Apr-04 7:29 
GeneralRe: auto+indentation feature Pin
kumaru_san22-Apr-04 18:32
kumaru_san22-Apr-04 18:32 
QuestionHow to float window over application properly Pin
Michael Wolski21-Apr-04 18:10
Michael Wolski21-Apr-04 18:10 
AnswerRe: How to float window over application properly Pin
Heath Stewart22-Apr-04 3:42
protectorHeath Stewart22-Apr-04 3:42 
GeneralRe: How to float window over application properly Pin
Michael Wolski22-Apr-04 4:20
Michael Wolski22-Apr-04 4:20 
Generalusercontrol Pin
Member 102128921-Apr-04 16:42
Member 102128921-Apr-04 16:42 
QuestionHow can I send an Image over a socket connection? Pin
Gakujin21-Apr-04 16:20
Gakujin21-Apr-04 16:20 
AnswerRe: How can I send an Image over a socket connection? Pin
Michael Wolski21-Apr-04 18:40
Michael Wolski21-Apr-04 18:40 
GeneralRe: How can I send an Image over a socket connection? Pin
Tim Kohler22-Apr-04 1:32
Tim Kohler22-Apr-04 1:32 
GeneralList box line spacing Pin
interlocked21-Apr-04 15:26
interlocked21-Apr-04 15:26 
GeneralAuto complete in custom web browser Pin
Weiye Chen21-Apr-04 15:22
Weiye Chen21-Apr-04 15:22 
GeneralRe: Auto complete in custom web browser Pin
Roman Rodov21-Apr-04 17:36
Roman Rodov21-Apr-04 17:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.